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.3

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.3
File Size Uploaded Provenance Actions
sentiogate_python-1.3.3.tar.gz 16.9 kB With provenance Details for sentiogate_python-1.3.3.tar.gz

Built distribution (wheel)

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

Total release size: 30.6 kB

Release files / sentiogate_python-1.3.3.tar.gz

Download URL sentiogate_python-1.3.3.tar.gz
Size 16.9 kB
Tags Source
SHA-256 checksum
How to use checksums
da21544dc1c8eb1431b302882c1cc0ba788e504d4c5c7d38e4a30342acb40767
BLAKE2b-256 checksum
How to use checksums
21263c9891d3b109c3803c050ba5f9f8f505c9e03da256b92d0c2b0270930eb5
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 28, 2026.

Transparency log

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

Download URL sentiogate_python-1.3.3-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
138d3e61ff6234a4676882f0df8be64cb93cd1c7cd0bd17ebbb5c85d16f98f12
BLAKE2b-256 checksum
How to use checksums
b76865f03613db9173a8994c65042dd1990e64eb8b881a2d29e0d98011f4d617
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 28, 2026.

Transparency log

Security for sentiogate-python 1.3.3

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.3.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 28, 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