Skip to main content

NuRoute Python SDK

The official Python SDK for NuRoute — a provider-agnostic LLM gateway that lets you route, monitor, and control inference requests across OpenAI, Anthropic, Google, and more.

Installation

pip install nuroute

Requires Python 3.9+.

Quick start

from nuroute import NuRouteClient

client = NuRouteClient(
    api_key="aicp-...",
    base_url="https://your-nuroute-gateway",
)

response = client.chat.complete(
    model="auto",  # classifies the request and routes it — see nuroute.ai/docs for strategies
    messages=[{"role": "user", "content": "Hello!"}],
)

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

Upgrading from an older version? AICPClient is still importable as a deprecated alias of NuRouteClient — existing code keeps working unchanged (it now raises a DeprecationWarning).

Streaming

for chunk in client.chat.stream(
    model="auto",
    messages=[{"role": "user", "content": "Tell me a story"}],
):
    print(chunk, end="", flush=True)

Async client

from nuroute import AsyncNuRouteClient

async with AsyncNuRouteClient(api_key="aicp-...", base_url="https://your-nuroute-gateway") as client:
    response = await client.chat.complete(
        model="auto",
        messages=[{"role": "user", "content": "Hello!"}],
    )

Authentication

result = client.auth.login(email="you@example.com", password="...")
client.set_api_key(result["token"])

Documentation

Full SDK documentation: nuroute.ai/docs

License

MIT

Metadata

Release files for nuroute 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 nuroute 0.1.0
File Size Uploaded
nuroute-0.1.0.tar.gz 22.1 kB Details

Built distribution (wheel)

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

Total release size: 36.6 kB

Release files / nuroute-0.1.0.tar.gz

Download URL nuroute-0.1.0.tar.gz
Size 22.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e5d27df2e48293fa201cc0968d3d28e1924b91b347a51b120b05017adc4a19b0
BLAKE2b-256 checksum
How to use checksums
5780ebc3bda0f76d3629b6b2d6327eb187baba6ccfb6e7391967e6d337727e88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

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

Download URL nuroute-0.1.0-py3-none-any.whl
Size 14.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
75cff3e08be7ad5e41f6e8c7cd38e6960c92b5ac49f19fe69b3f5fc9bb31d28b
BLAKE2b-256 checksum
How to use checksums
df1c91b24932fcf0d787738066f1d42fdc30975d414333ec5d1579a4b7921331
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.8 {"installer":{"name":"uv","version":"0.10.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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