Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Quantiles Python SDK

Python SDK for the quantiles local AI workload observability server.

Installation

uv add 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 for details.

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:

mise run test

Run linter:

mise run lint