SDK
Python SDK
The Python SDK is suited for data pipelines, evaluation harnesses, and backend services.
Client setup
Use one reusable client instance and avoid constructing clients inside hot loops.
from tellodb import TellodbClient
client = TellodbClient.from_local(
api_key="XXX1111AAA",
timeout=10,
)
# or for cloud:
# client = TellodbClient.from_cloud(api_key="sk-...")Batch ingest pattern
For very large batches, parallelize by entity partition to reduce lock contention and preserve ordering semantics within each session.
from tellodb import IngestItem
items = [
IngestItem(entity_id="user-123", text="I moved to LA."),
IngestItem(entity_id="user-123", text="I now prefer tea."),
]
client.ingest_many(items)Evaluation usage
- Keep deterministic seeds for benchmark comparability.
- Record model and policy versions in run metadata.
- Persist raw hit lists, not only aggregate metrics.