I'm newbie to python would like some guidance.
I want to create a file with the meraki.dashboardAPI(API_KEY) in it and call it from scripts I write. I don't want to have the call in every script. I got the API_KEY in a file and call it into the script using from key import API_KEY and it works. I would like to create the same for the dashboardAPI call.
For example
init.py
dashboard = meraki.DashboardAPI(
api_key = api_key,
base_url = 'https://api-mp.meraki.com/api/v1/',
#log_file_prefix = os.path.basename(__file__[:-3],
#log_path= './Logs',
print_console = False
)
getOrganizationID.py
my_org = dashboard.organizations.getOrganizations()
I can't figure out how to get the dasboard info into the file.
Thanks in advance.