Environment Variables

Full configuration reference for the Elephantasm SDK.

Environment Variables

The SDK reads configuration from environment variables. These can also be passed directly to the client constructor.

NameTypeRequiredDescription
ELEPHANTASM_API_KEYstringrequiredYour API key (starts with sk_live_)
ELEPHANTASM_ANIMA_IDstringoptionalDefault anima ID for module-level functions
ELEPHANTASM_ENDPOINTstringoptionalAPI endpoint (default: https://api.elephantasm.com)
ELEPHANTASM_TIMEOUTstringoptionalRequest 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=30

Never 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

  1. Constructor arguments (highest priority)
  2. Environment variables
  3. Default values (lowest priority)