I am trying to break my Python script into multiple .py files. In sf_opps.py file I have all the login credentials and a query that fetches the data with REST API call. The data is stored in sf_prod_data variable. How can I access this variable that contains the data I need from another .py file?
I need to loop through the sf_prod_data and I don't want to use classes as all of my code are mostly loops, so need to know how to access the variables with stored data in it from different .py files.
I have tried:
import sf_opps
print(sf_prod_data)
sf_prod_data is Undefined
print(sf_opps.sf_prod_data)