Homepage • Documentation • Discord • JavaScript SDK & CLI tools
This is a monorepo containing multiple PyPI packages:
| Package | Description | PyPI |
|---|---|---|
gatana-langchain |
LangChain Sandbox integration toolkit | |
gatana-client |
SDK client for Gatana |
pip install gatana-langchain
# or, if you only want the SDK:
pip install gatana-clientOr with uv:
uv add gatana-langchain
# or, if you only want the SDK:
uv add gatana-clientfrom gatana_client import GatanaClient
from gatana_langchain import GatanaSandbox
# Env variables: GATANA_API_KEY and GATANA_ORG_ID
# Or, ~/.gatana.config
client = GatanaClient()For configuration, you can prepare a file at ~/.gatana.config, see Config File for details. You can override configuration using environment variables or by passing options directly in the SDK.
gatana-client resolves authentication in the following order:
- Passed options —
token+ (org_idorbase_url) - Environment variables —
GATANA_API_KEY+ (GATANA_ORG_IDorGATANA_BASE_URL) - Config file
~/.gatana.config— API key or access token per organization
| Variable | Description |
|---|---|
GATANA_API_KEY |
API key for authentication |
GATANA_ORG_ID |
Organization ID (derives https://<org-id>.gatana.ai/api/v1) |
GATANA_BASE_URL |
Override the base URL directly |
The config file at ~/.gatana.config supports multiple organizations:
{
"orgs": {
"my-org": {
"baseUrl": "https://my-org.gatana.ai",
"apiKey": "sk-...",
"tokens": {
"access_token": "...",
"refresh_token": "...",
"expires_at": 1234567890
}
}
},
"defaultOrgId": "my-org"
}Authentication methods per organization:
- API key — set directly in the config file or via the Gatana CLI (
gatana config set-api-key) - OIDC tokens — set via the Gatana CLI (
gatana config login), tokens are read as-is
Note: The config file format is shared with the Gatana CLI tools. You can use the CLI to manage your
~/.gatana.configand the Python SDK will pick it up automatically.
Provide a ConfigLoader or explicit options:
from gatana_client import GatanaClient, ConfigLoader, OptionsConfigStrategy
# Using explicit options
client = GatanaClient(token="sk-...", org_id="my-org")
# Using a custom config loader
client = GatanaClient(
config_loader=ConfigLoader([
OptionsConfigStrategy(api_key="sk-...", org_id="my-org")
])
)See CONTRIBUTING.md for how to set up the development environment, run tests, and submit changes.
MIT — Copyright (c) 2026 Gatana