Configuration¶
Configure the Unique Python SDK with your credentials.
Prerequisites¶
Before you begin, you'll need:
- Python 3.11 or higher
- Unique App ID and API Key (contact your Unique customer success manager)
- User ID and Company ID for API requests
Basic Setup¶
Configure the SDK with your credentials:
import unique_sdk
# Set your API credentials
unique_sdk.api_key = "ukey_..."
unique_sdk.app_id = "app_..."
Environment Variables (Recommended)¶
For better security, use environment variables:
export UNIQUE_API_KEY="ukey_..."
export UNIQUE_APP_ID="app_..."
Then load them in your code:
import os
import unique_sdk
unique_sdk.api_key = os.getenv("UNIQUE_API_KEY")
unique_sdk.app_id = os.getenv("UNIQUE_APP_ID")
Using python-dotenv¶
Alternatively, use a .env file with python-dotenv:
pip install python-dotenv
Create a .env file:
UNIQUE_API_KEY=ukey_...
UNIQUE_APP_ID=app_...
Load in your code:
from dotenv import load_dotenv
import os
import unique_sdk
load_dotenv()
unique_sdk.api_key = os.getenv("UNIQUE_API_KEY")
unique_sdk.app_id = os.getenv("UNIQUE_APP_ID")
Next Steps¶
Now that you've configured the SDK:
- Try the Quickstart guide - Make your first API call
- Explore API Resources - Browse available APIs
- Read the Architecture guide - Understand SDK structure
- Check out Tutorials - See step-by-step tutorials