Skip to main content

rsroute

What it is

rsroute is a lightweight Python client for RSRoute — a unified gateway that routes requests across 10+ LLM providers seamlessly.

Why it is

Instead of managing disparate SDKs, raw HTTP requests, query parameters, and custom endpoints manually for each provider, rsroute provides a simple, unified wrapper so you can connect to your RSRoute server with minimal code.

Code Example - ChatModel

from rsroute.chat_models import ChatGemini, ChatMistral, ChatGroq, ChatOpenRouter

# Gemini
gemini_model = ChatGemini(
    model="gemini-3.5-flash-lite",
    rsroute_url="http://0.0.0.0:8000", # your URL always default to this.
)
response = gemini_model.invoke(query="What is GitHub?")
print(response)

# Groq
groq_model = ChatGroq(
    model="openai/gpt-oss-120b",
    temperature=0.7,
)
response = groq_model.invoke(query="Hello Groq!")
print(response)

# OpenRouter
openrouter_model = ChatOpenRouter(
    model="deepseek/deepseek-v4.1-flash",
    temperature=0.7,
)
response = openrouter_model.invoke(query="Hello OpenRouter!")
print(response)

Code Example - Agents

from rsroute.agents import GeminiAgent, MistralAgent, GroqAgent, OpenRouterAgent

# Gemini Agent
gemini_agent = GeminiAgent(
    tools=[web_search], # your tools
    max_tool_calls=12 # Default to 10
)
response = gemini_agent.invoke(query="Latest News of GPT-6 Astra")
print(response)

# Mistral Agent
mistral_agent = MistralAgent(
    tools=[web_search],
    model="mistral-small-2603"
)
response = mistral_agent.invoke(query="What is the weather in Paris?")
print(response)

# Groq Agent
groq_agent = GroqAgent(
    tools=[web_search],
    model="openai/gpt-oss-120b"
)
response = groq_agent.invoke(query="Compute 42 * 42")
print(response)

# OpenRouter Agent
openrouter_agent = OpenRouterAgent(
    tools=[web_search],
    model="deepseek/deepseek-v4.1-flash"
)
response = openrouter_agent.invoke(query="Search latest news")
print(response)

Feature

  • automatic master_key loading from .env
  • proper request handling
  • Agentic power

Valid .env name

Any of the following variable names can be used in your .env file:

  • rsroute_token (or RSROUTE_TOKEN)
  • master_key (or MASTER_KEY)
  • rsroute_key (or RSROUTE_KEY)
  • rsroute_master_key (or RSROUTE_MASTER_KEY)

Server

RSRoute Server repository: RSRoute GitHub

RSRoute website: RSRoute Web

Metadata

Release files for rsroute 0.1.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 rsroute 0.1.0
File Size Uploaded Provenance Actions
rsroute-0.1.0.tar.gz 7.1 kB Without provenance Details for rsroute-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rsroute 0.1.0
File Interpreter ABI Platform Actions
rsroute-0.1.0-py3-none-any.whl Python 3 none any Details for rsroute-0.1.0-py3-none-any.whl

Total release size: 23.1 kB

Release files / rsroute-0.1.0.tar.gz

Download URL rsroute-0.1.0.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
721343c8389a9e10780f01e96f65428a9715b281fe3eb4902cbb85f2a174d6f9
BLAKE2b-256 checksum
How to use checksums
bc7f101a454c0598b1a2662dd8328f9151fecb07a6ecaa629bb9df4bfa5a281e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Release files / rsroute-0.1.0-py3-none-any.whl

Download URL rsroute-0.1.0-py3-none-any.whl
Size 16.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b253f07ba645b6f44e4091e81a09fd5a7d9b69b53aba4a55f6d5b499c35794c9
BLAKE2b-256 checksum
How to use checksums
bdc90f337bf3a529072920db0b38bd646b120e9d8df992496b725c73a60d7ed4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.5

Security for rsroute 0.1.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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