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

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.1
File Size Uploaded Provenance Actions
sentiogate_python-1.3.1.tar.gz 15.0 kB With provenance Details for sentiogate_python-1.3.1.tar.gz

Built distribution (wheel)

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

Total release size: 28.1 kB

Release files / sentiogate_python-1.3.1.tar.gz

Download URL sentiogate_python-1.3.1.tar.gz
Size 15.0 kB
Tags Source
SHA-256 checksum
How to use checksums
eee72ab58124b46b7baa7b1b4cebdbbf25009d202cb363e4a6dc5167e1ba457d
BLAKE2b-256 checksum
How to use checksums
76b0e49c89cce8becdb7103fdc475820d30fb5b2e04c5b27f6c17e0258c0e71e
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 10, 2026.

Transparency log

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

Download URL sentiogate_python-1.3.1-py3-none-any.whl
Size 13.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6343fb594151674efe9f6ecd6044b7349750a46a887b62d7d721bd30784cf3f7
BLAKE2b-256 checksum
How to use checksums
0183dcc350b0c8f8fca89796cd9a56becd0533cbc7af5077cd9e0ddebf48cfa6
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 10, 2026.

Transparency log

Security for sentiogate-python 1.3.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.

Full provenance

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

Select from 2 files

Attestation for sentiogate_python-1.3.1.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 10, 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