function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sneha KavinkarSneha Kavinkar 

How to programatically access Salesforce reports using Python beatbox?

Hello,
I want to access Python reports programatically using beatbox or any other module if available. Has anyone did this before?
 
Maneet GiriManeet Giri
Hey Sneha,

Did you find the solution yet. Use simple_salesforce module.

Here is the code
session.get("https://na4.salesforce.com/xxxxxxxxxxxxxx?export=1&enc=UTF-8&xf=csv".format('xxxxxxxxxxxxx'), headers=sf.headers, cookies={'sid': sf.session_id})
df_sfdc_error_report_defined = pd.DataFrame.from_csv(StringIO(error_report_defined.text))
df_sfdc_error_report_defined = df_sfdc_error_report_defined.to_csv('defined.csv', encoding = 'utf-8')
error_report = pd.read_csv('defined.csv')
print (error_report)