Metadata-Version: 2.4
Name: rusty-agent-sdk
Version: 0.1.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Typing :: Typed
License-File: LICENSE
Summary: Rust-powered Python SDK for OpenAI-compatible text generation and streaming
Keywords: llm,openai,rust,streaming,openrouter,sdk,pyo3
Author-email: Mangesh Kashid <mtkashid7@gmail.com>
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/LEO2822/rusty-agent-sdk
Project-URL: Issues, https://github.com/LEO2822/rusty-agent-sdk/issues
Project-URL: Repository, https://github.com/LEO2822/rusty-agent-sdk

# rusty-agent-sdk

[![PyPI](https://img.shields.io/pypi/v/rusty-agent-sdk)](https://pypi.org/project/rusty-agent-sdk/)
[![License](https://img.shields.io/pypi/l/rusty-agent-sdk)](LICENSE)

Rust-powered Python SDK for OpenAI-compatible text generation and streaming.

## Installation

```bash
pip install rusty-agent-sdk
```

## Quick Start

Set your API key:

```bash
export OPENROUTER_API_KEY="your-key"
```

Then use the SDK:

```python
from rusty_agent_sdk import Provider

provider = Provider("openai/gpt-4o-mini")

# Blocking generation
text = provider.generate_text("Say hello in one sentence.")
print(text)

# Streaming
for chunk in provider.stream_text("Count to 3."):
    print(chunk, end="", flush=True)
print()
```

## Custom Endpoint

```python
provider = Provider(
    "gpt-4o-mini",
    api_key="sk-...",
    base_url="https://api.openai.com/v1",
)
```

## Example

See [examples/basic_usage.py](examples/basic_usage.py) for a runnable demo.

## Development

```bash
# Build and install locally
uv run maturin develop

# Run checks
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test
```

## License

Apache 2.0

