Environment Variables
The SDK reads configuration from environment variables. These can also be passed directly to the client constructor.
| Name | Type | Required | Description |
|---|---|---|---|
| ELEPHANTASM_API_KEY | string | required | Your API key (starts with sk_live_) |
| ELEPHANTASM_ANIMA_ID | string | optional | Default anima ID for module-level functions |
| ELEPHANTASM_ENDPOINT | string | optional | API endpoint (default: https://api.elephantasm.com) |
| ELEPHANTASM_TIMEOUT | string | optional | Request timeout in seconds (default: 30) |
Setting Variables
Shell
export ELEPHANTASM_API_KEY=sk_live_...
export ELEPHANTASM_ANIMA_ID=your-anima-uuid.env File
ELEPHANTASM_API_KEY=sk_live_...
ELEPHANTASM_ANIMA_ID=your-anima-uuid
ELEPHANTASM_ENDPOINT=https://api.elephantasm.com
ELEPHANTASM_TIMEOUT=30Never commit .env files to source control. Add .env to your .gitignore.
Constructor Override
Environment variables can be overridden by passing values to the client constructor:
from elephantasm import Elephantasm
client = Elephantasm(
api_key="sk_live_...", # overrides ELEPHANTASM_API_KEY
anima_id="custom-anima", # overrides ELEPHANTASM_ANIMA_ID
endpoint="https://custom.api.com",# overrides ELEPHANTASM_ENDPOINT
timeout=60, # overrides ELEPHANTASM_TIMEOUT
)Priority Order
- Constructor arguments (highest priority)
- Environment variables
- Default values (lowest priority)