Metadata-Version: 2.4
Name: quantiles
Version: 0.1.0
Summary: Python SDK for the Quantiles local AI workload observability server
Keywords: evals,llm,observability,ai,quantiles
Author: Aaron Schlesinger, Golda Manuel
Author-email: Aaron Schlesinger <aaron@quantiles.io>, Golda Manuel <golda@quantiles.io>
License-Expression: Apache-2.0
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: aiohttp~=3.11
Requires-Dist: numpy~=2.4.4
Requires-Dist: pydantic~=2.11
Requires-Dist: scipy>=1.12.0,<2.0.0
Requires-Dist: openai~=2.36.0
Requires-Python: >=3.12
Project-URL: Homepage, https://quantiles.io
Project-URL: Documentation, https://quantiles.io/docs
Project-URL: Repository, https://github.com/quantiles-evals/quantiles
Project-URL: Issues, https://github.com/quantiles-evals/quantiles/issues
Description-Content-Type: text/markdown

# Quantiles Python SDK

Python SDK for the [quantiles](https://quantiles.io) local AI workload observability server.

## Installation

```bash
uv pip install quantiles
```

## Usage

To build a custom eval with Python, use the below code. To ensure this eval is runnable with `qt run`, set up a `quantiles.toml` configuration file. See [`../CONFIG.md`](../CONFIG.md) for details.

```python
import asyncio
from quantiles import workflow, step, emit, entrypoint

async def handler(input_value, ctx):
    result = await ctx.step(
        "fetch-data",
        {"url": "https://example.com"},
        lambda: {"status": 200}
    )
    await ctx.emit("latency_ms", 50, "ms")
    return result

my_workflow = workflow("demo", handler)

if __name__ == "__main__":
    entrypoint(my_workflow)
```

In local development, the SDK executes user code locally. The `qt` server deduplicates steps, triggers workflows, owns durable state, stored outputs, observability records, and metrics.

## Development

Run tests:

```bash
mise run test
```

Run linter:

```bash
mise run lint
```
