Metadata-Version: 2.5
Name: nuroute
Version: 0.1.0
Summary: Official Python SDK for NuRoute — provider-agnostic inference client
Project-URL: Homepage, https://github.com/NuRoute-ai/sdk-python
Project-URL: Repository, https://github.com/NuRoute-ai/sdk-python
Project-URL: Issues, https://github.com/NuRoute-ai/sdk-python/issues
Project-URL: Documentation, https://nuroute.ai/docs
License: MIT
Requires-Python: >=3.9
Requires-Dist: httpx>=0.27.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: respx>=0.21; extra == 'dev'
Description-Content-Type: text/markdown

# NuRoute Python SDK

The official Python SDK for [NuRoute](https://github.com/NuRoute-ai/sdk-python) — a provider-agnostic LLM gateway that lets you route, monitor, and control inference requests across OpenAI, Anthropic, Google, and more.

## Installation

```bash
pip install nuroute
```

Requires **Python 3.9+**.

## Quick start

```python
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

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

## Async client

```python
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

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

## Documentation

Full SDK documentation: [nuroute.ai/docs](https://nuroute.ai/docs)

## License

MIT
