Releases: OnlistTeam/python-sdk
Releases · OnlistTeam/python-sdk
Release list
v0.2.1
v0.2.0
What's New
Typed Marketplace Responses
models.list() now returns list[Model] instead of list[dict], giving full attribute access:
models = client.marketplace.models.list()
for m in models.data:
print(m.id, m.name) # was m["id"], m["name"]ModelDetail and ProviderDetail now inherit from their base types instead of duplicating fields.
Rankings API
Access model and app usage leaderboards:
rankings = client.marketplace.rankings.models()
apps = client.marketplace.rankings.apps()Context Manager Support
with Onlist() as client:
response = client.chat.completions.create(...)
# httpx client is properly closed
async with AsyncOnlist() as client:
response = await client.chat.completions.create(...)Marketplace Retry
Automatic retries with exponential backoff and jitter for transient failures (408, 429, 5xx). Configurable via max_retries (default: 2).
Other Improvements
- OPENAI_API_KEY fallback: The client reads
OPENAI_API_KEYifONLIST_API_KEYis not set, for easier migration. - NotFoundError: Dedicated error class for 404 responses from marketplace endpoints.
Full Changelog: v0.1.0...v0.2.0
v0.1.0
Onlist Python SDK v0.1.0
Initial release of the official Python SDK for Onlist.
Features
Onlist/AsyncOnlistclients — drop-in replacement foropenai.OpenAI- Marketplace API: query models, providers, and pricing
ProviderRoutingtype for marketplace routing control- Error hierarchy:
AuthenticationError,RateLimitError,ProviderError, etc. - Full type hints with
py.typed(PEP 561) - 5 ready-to-run examples
Installation
pip install onlistQuick Start
from onlist import Onlist
client = Onlist(api_key="sk-...")
response = client.chat.completions.create(
model="anthropic/claude-sonnet-4-6",
messages=[{"role": "user", "content": "Hello!"}],
)
print(response.choices[0].message.content)