Advanced — 0.0.x primitives
You don't need this page for a normal integration. Use the quickstarts and createMythos() instead. These low-level functions remain exported for custom setups.
Python SDK overview
API reference for mythos-sdk — the official Mythos SDK for Python.
info
Just getting started? Quickstart: FastAPI
Install
bash
pip install "mythos-sdk[fastapi]"
Exports
| Export | Description |
|---|---|
handshake_router | Pre-built FastAPI router for publish handshake |
create_handshake_router | Factory for customizable handshake router |
create_listing_callback_handler | Handler for listing registration callback |
require_launch_token | FastAPI dependency factory — verify + consume |
verify_launch_token | Low-level JWT verify |
report_usage | Debit Consumer wallet |
MythosSession | Session dataclass |
MythosError | Base error |
MythosConfigError | Missing/invalid SDK config |
InvalidLaunchTokenError | Launch token failed claim validation |
InsufficientFundsError | Wallet has no credits |
SessionNotFoundError | Session JTI not found |
InvalidUsageError | Invalid arguments passed to an SDK function |
MythosSession
python
@dataclass
class MythosSession:
userId: str
email: str
displayName: str
listingId: str
sessionJti: str # camelCase — matches Node SDK