NaN
Generate API key
Generate API key in your Maihem account settings.
Book a call to get access to the Maihem platform
NaN
Set API key as environment variable
Set your Maihem API key as an environment variable called
Load the environment variables from the
MAIHEM_API_KEY
.Need help setting the environment variable?
Need help setting the environment variable?
Option 1: Pass in Python script
Easiest option for quick prototyping, but not the safest to store your API keys.In your Python code:Python
Option 2: Local environment .env file
Safest for storing API keys in production.Create a.env
file with the following content:.env file
.env
file in Python:Python
Option 3: In local bash script
To make the environment variable available to any script locally.MacOS
MacOS
In a terminal run the command:
Linux
Linux
In a terminal run the command:
Windows
Windows
In a terminal run the command:
NaN
Install or upgrade the Python SDK
This assumes you have Python installed. See this guide to install Python if needed.
Make sure to continuously upgrade to the latest version