- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
MERAKI_API_KEY Environment Variable
Good Morning!
Can someone tell me to proper way of setting the MERAKI_API_KEY environment variable in Linux? I get it set but everytime I reboot my system I loss it.
Thanks in advance!
Ed
Solved! Go to solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It needs to be in the environment of the user executing the scripts that need it.
If you want it just for yourself, you could edit your .profile to add...
MERAKI_API_KEY="whatever it is"
export MERAKI_API_KEY
If you will be running the Python scripts from inside a shell script wrapper (for instance if you were using cron to run the script periodically) you can put the same lines in the shell script.
At the linux shell prompt, you can type 'env' to see your environment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It needs to be in the environment of the user executing the scripts that need it.
If you want it just for yourself, you could edit your .profile to add...
MERAKI_API_KEY="whatever it is"
export MERAKI_API_KEY
If you will be running the Python scripts from inside a shell script wrapper (for instance if you were using cron to run the script periodically) you can put the same lines in the shell script.
At the linux shell prompt, you can type 'env' to see your environment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I personally prefer the ".env" method, which stores it in an environment file in your home directory. This is also portable across lots of different environments.
Crap. That article uses referenes to the old Meraki SDK - but the concept is still legit.
