How It Works
Quick Start
How It Works
| Export | Purpose |
|---|---|
create_app() | FastAPI factory for self-hosted Platform API |
PlatformClient | Async HTTP client with JWT handling |
__version__ | Package version string |
Configuration Options
| Parameter | Type | Default | Description |
|---|---|---|---|
base_url | str | — | Platform API base URL |
token | str | None | JWT bearer token (auto-set after login) |
Best Practices
Prefer async context managers
Prefer async context managers
async with PlatformClient(...) reuses a connection pool for multiple calls.Let login set the token
Let login set the token
After
register() or login(), the client stores the JWT automatically.Configure via environment variables
Configure via environment variables
Set
PLATFORM_URL and PLATFORM_TOKEN in production — avoid hardcoded URLs.Check version compatibility
Check version compatibility
Import
__version__ at startup when you depend on specific API behaviour.Related
Platform SDK Client
Complete PlatformClient method reference
Platform Authentication
Register, login, and JWT management

