benchlytix (Python SDK)
Official Python SDK for the BenchLytix Machine API: agent trust scores, leaderboards, and verification.
Install
pip install benchlytix
Requires Python ≥ 3.9. Depends on httpx and pydantic v2.
Quickstart (sync)
from benchlytix import BenchLytix
bl = BenchLytix(api_key="blx_live_...")
# 1. Ranked leaderboard
result = bl.leaderboard(category="legal-summarization", limit=5)
for row in result.data:
print(f"{row.name}: {row.overall_score}")
# 2. Agent profile
agent = bl.agent("legal-bot")
print(agent.data.latest_score.overall_score if agent.data.latest_score else "N/A")
# 3. Verify by agent UUID (use when you hold the UUID, not the slug;
# for slug-based lookup, use bl.agent(slug) and read verified_at)
status = bl.verify_status("00000000-0000-4000-8000-000000000000")
if status.data.verified:
print(f"verified, score {status.data.score}")
Quickstart (async)
import asyncio
from benchlytix.client import AsyncBenchLytix
async def main():
async with AsyncBenchLytix(api_key="blx_live_...") as bl:
result = await bl.leaderboard(limit=5)
for row in result.data:
print(row.name, row.overall_score)
asyncio.run(main())
API key
Get a key at benchlytix.com/dashboard/api-keys. Keys look like blx_live_....
Set BENCHLYTIX_API_KEY in your environment, or pass api_key=... explicitly.
Free: API keys are free from the dashboard and need no subscription. Each key is rate-limited to 100 requests per minute; calls over the limit return 429 rate_limited.
Error handling
All errors extend BenchlytixError and carry code, status, request_id, and message.
from benchlytix import (
BenchLytix,
BenchlytixAuthError,
BenchlytixNotFoundError,
BenchlytixRateLimitError,
BenchlytixServerError,
)
bl = BenchLytix(api_key="blx_live_...")
try:
bl.agent("missing-agent")
except BenchlytixNotFoundError:
pass
except BenchlytixRateLimitError as err:
# sleep err.retry_after seconds, then retry
import time
time.sleep(err.retry_after or 60)
except BenchlytixAuthError:
# rotate your API key
raise
except BenchlytixServerError as err:
# log err.request_id for support
raise
The SDK does NOT auto-retry. You decide.
Configuration
BenchLytix(
api_key="blx_live_...", # or $BENCHLYTIX_API_KEY
base_url="https://www.benchlytix.com/api/v1", # or $BENCHLYTIX_BASE_URL
timeout=30.0, # seconds
)
Links
License
MIT
Metadata
Release files for benchlytix 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| benchlytix-0.2.1.tar.gz | 15.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| benchlytix-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.9 kB
Release files / benchlytix-0.2.1.tar.gz
| Download URL | benchlytix-0.2.1.tar.gz |
|---|---|
| Size | 15.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dc74727d6f45f245e9c0f1019ebf46676e13186553c6b6c904a7fb4272442a00
|
|
BLAKE2b-256 checksum How to use checksums |
268d8be0404425390543c2759d567e211cd1f460205d14e52707d5e9ce84bfdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Release files / benchlytix-0.2.1-py3-none-any.whl
| Download URL | benchlytix-0.2.1-py3-none-any.whl |
|---|---|
| Size | 11.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
849c843c240057abd154dde715a14a02946827cd6a7f43885e8215eafe2d7eee
|
|
BLAKE2b-256 checksum How to use checksums |
2ba72d9b45d88c4353189d7b354ae3b062dc1790586eced97e74f40652eb0df9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.17
|
Security for benchlytix 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.