Documentation Index
Fetch the complete documentation index at: https://docs.shannon.run/llms.txt
Use this file to discover all available pages before exploring further.
Install
From source (dev):
git clone https://github.com/Kocoro-lab/Shannon.git
cd Shannon/clients/python
pip install -e .
Optional (WebSocket streaming support):
Quick Verify
from shannon import ShannonClient
client = ShannonClient(base_url="http://localhost:8080")
print("✓ SDK ready")
Auth
from shannon import ShannonClient
client = ShannonClient(
base_url="http://localhost:8080",
api_key="sk_test_123"
)
Env-driven:
import os
from shannon import ShannonClient
client = ShannonClient(
base_url=os.getenv("SHANNON_BASE_URL", "http://localhost:8080"),
api_key=os.getenv("SHANNON_API_KEY"),
)
Client Options
| Param | Type | Default | Notes |
base_url | str | http://localhost:8080 | Gateway HTTP URL |
api_key | str | None | Sent as X-API-Key |
bearer_token | str | None | Alternative Authorization: Bearer |
default_timeout | float | 30.0 | Seconds |
Async Client
import asyncio
from shannon import AsyncShannonClient
async def main():
async with AsyncShannonClient(base_url="http://localhost:8080") as client:
h = await client.submit_task("Analyze data")
s = await client.wait(h.task_id)
print(s.result)
asyncio.run(main())
CLI
python -m shannon.cli --base-url http://localhost:8080 submit "What is 2+2?" --wait