To begin using the inmydata Agent API, you'll need to set up your development environment properly. This includes creating a virtual environment and configuring the necessary environment variables.
1. Create a Python Virtual Environment
It's best practice to isolate your project dependencies using a virtual environment.
Steps:
Create the environment:
Activate the environment:
On macOS/Linux:
On Windows:
Upgrade pip (optional but recommended):
Install the inmydata SDK:
2. Set Required Environment Variables
To authenticate and configure your connection to the inmydata Agent API, you'll need to set the following environment variables:
Required Variables
Variable | Description |
---|---|
INMYDATA_API_KEY | Your personal API key used to authenticate with inmydata |
INMYDATA_TENANT | Your organization’s tenant name (e.g. demo for https://demo.inmydata.com) |
INMYDATA_CALENDAR | The name of the calendar you want your agent to use |
How to Obtain Each Variable
? INMYDATA_API_KEY
Log in to inmydata (or your tenant-specific domain, e.g. https://demo.inmydata.com).
Open the User menu (usually found in the top right).
Click "API Keys".
Press "Create a new API key".
? The API key grants data access based on the user’s privileges. Treat it like a password—do not share or commit it to version control.
? INMYDATA_TENANT
Your tenant is the subdomain you use to log in to inmydata.
For example:
If you access the platform via
https://demo.inmydata.com
, your tenant isdemo
.If your organization logs in at
https://acme.inmydata.com
, your tenant isacme
.
? INMYDATA_CALENDAR
Log in to inmydata.
From the Settings menu, select "Edit Calendars".
Choose the name of the calendar you want your agent to use and set this as your value.
3. Loading Environment Variables in Your Project
As detailed above, we recommend using a .env
file for local development.
.env
example:
Load these in your Python script using:
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article