Skip to main content

SentioGate Python SDK (sentiogate-python)

PyPI version Python versions License: Apache-2.0 Website Live Benchmarks

Thin, zero-dependency Python client for SentioGate — the zero-markup, OpenAI-compatible LLM router for your own provider keys (BYOK). It picks a suitable model for each request and automatically falls back to another model if one fails.


⚡ Installation

pip install sentiogate-python

(Zero external dependencies: uses Python standard library for maximum reliability and minimal container footprint).


🚀 Quickstart

import os
from sentiogate import AutoRouterClient

client = AutoRouterClient(
    api_key=os.environ.get("SENTIOGATE_API_KEY"),
)

response = client.chat(
    model="auto",  # SentioGate picks the model; cheapest suitable by default
    messages=[
        {"role": "system", "content": "You are a helpful software architect."},
        {"role": "user", "content": "What is the difference between gRPC and REST?"}
    ]
)

print(response["choices"][0]["message"]["content"])

🌊 Streaming Completions

import os
from sentiogate import AutoRouterClient

client = AutoRouterClient(api_key=os.environ.get("SENTIOGATE_API_KEY"))

for chunk in client.stream_chat(
    model="auto",
    messages=[{"role": "user", "content": "Write a binary search in Python."}],
    extra_body={"route_preference": "latency"},  # "cost" (default), "quality" or "latency"
):
    delta = chunk.get("choices", [{}])[0].get("delta", {}).get("content", "")
    print(delta, end="", flush=True)
print()

🛠️ Routing preference

Send model="auto" and set route_preference through extra_body to "cost" (default), "quality" or "latency". You can also request a specific provider/model. SentioGate automatically falls back to another model if one fails.

Retries are off by default. Set max_retries to retry transient 429s after the server's Retry-After (the server may ask you to wait); waits longer than max_retry_wait raise RouterClientError instead.


Metadata

Release files for sentiogate-python 1.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sentiogate-python 1.3.0
File Size Uploaded Provenance Actions
sentiogate_python-1.3.0.tar.gz 14.7 kB With provenance Details for sentiogate_python-1.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sentiogate-python 1.3.0
File Interpreter ABI Platform Actions
sentiogate_python-1.3.0-py3-none-any.whl Python 3 none any Details for sentiogate_python-1.3.0-py3-none-any.whl

Total release size: 27.6 kB

Release files / sentiogate_python-1.3.0.tar.gz

Download URL sentiogate_python-1.3.0.tar.gz
Size 14.7 kB
Tags Source
SHA-256 checksum
How to use checksums
877d2e6807b35dc960a2a187956a2d3fe7cdbbbd3115ceb171aba52d7f53d391
BLAKE2b-256 checksum
How to use checksums
5aa1985c0e24ee2e55b23642cdea006822c1fdda78ec5ef3a7011d4a30a93273
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / sentiogate_python-1.3.0-py3-none-any.whl

Download URL sentiogate_python-1.3.0-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c81ab0cf580f65eff3e2c70084a147902ac61bf012b2821e5f4dae1c2df89f9a
BLAKE2b-256 checksum
How to use checksums
50be1cc586f184b3f0d859cd4347d115f3ed497a539ca32a3ce8a5886794d8b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for sentiogate-python 1.3.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for sentiogate_python-1.3.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page