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

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.2
File Size Uploaded Provenance Actions
sentiogate_python-1.3.2.tar.gz 16.3 kB With provenance Details for sentiogate_python-1.3.2.tar.gz

Built distribution (wheel)

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

Total release size: 29.5 kB

Release files / sentiogate_python-1.3.2.tar.gz

Download URL sentiogate_python-1.3.2.tar.gz
Size 16.3 kB
Tags Source
SHA-256 checksum
How to use checksums
7a57536a9f02681feb9e1938f8eeeba0ee949a37152574b26c8d11d3d732f1c3
BLAKE2b-256 checksum
How to use checksums
30da1925665c2f1556958a26ea16a11b9e3882a9aa3688cb4d2f49f8f126873c
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 27, 2026.

Transparency log

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

Download URL sentiogate_python-1.3.2-py3-none-any.whl
Size 13.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e6c7ed32f9bfa7a432c09809d290b2ff230d80452b1de3b54b9a6409183fd29b
BLAKE2b-256 checksum
How to use checksums
e8d1b0149c28419296e31242f83cde7602c1ca60287932959a2c2a36b80f5ba1
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 27, 2026.

Transparency log

Security for sentiogate-python 1.3.2

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.2.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 27, 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