evalwatch
Python client for sending LLM traces to EvalWatch — a SaaS observability and evaluation platform for LLM products.
Install
# Sync client only (uses requests)
pip install evalwatch
# Sync + async client (adds httpx)
pip install 'evalwatch[async]'
Quick start — sync
Get an API key from your EvalWatch dashboard (/settings), then instrument your LLM calls:
from evalwatch import EvalWatchClient
client = EvalWatchClient("https://your-evalwatch-instance.com", api_key="sk-...")
# 1. Manual
client.send_trace(
prompt="What is the capital of France?",
response="Paris.",
latency_ms=120,
model_name="gpt-4o",
provider="openai",
token_usage=30,
)
# 2. Context manager — measures latency automatically
with client.capture(prompt="...", model_name="gpt-4o", provider="openai") as trace:
response = openai_client.chat.completions.create(...)
trace.finish(response=response.choices[0].message.content, token_usage=response.usage.total_tokens)
# 3. Decorator — wraps any function whose first arg is the prompt
@client.watch(model_name="gpt-4o", provider="openai")
def call_llm(prompt: str) -> str:
return openai_client.complete(prompt)
# Retry on transient failures (ConnectionError or 5xx)
client.send_trace(..., max_retries=2)
Quick start — async
from evalwatch import AsyncEvalWatchClient
client = AsyncEvalWatchClient("https://your-evalwatch-instance.com", api_key="sk-...")
# 1. Manual (awaitable)
await client.send_trace(
prompt="What is the capital of France?",
response="Paris.",
latency_ms=120,
model_name="gpt-4o",
provider="openai",
token_usage=30,
)
# 2. Async context manager
async with client.capture(prompt="...", model_name="gpt-4o") as trace:
response = await openai_client.chat.completions.acreate(...)
await trace.finish(response=response.choices[0].message.content)
# 3. Async decorator
@client.watch(model_name="gpt-4o", provider="openai")
async def call_llm(prompt: str) -> str:
return await openai_client.acomplete(prompt)
All methods send traces to POST /api/v1/observe/traces and are visible in the Traces dashboard immediately.
License
MIT
Metadata
Release files for evalwatch 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| evalwatch-0.1.1.tar.gz | 25.9 kB | Without provenance | Details for evalwatch-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| evalwatch-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for evalwatch-0.1.1-py3-none-any.whl |
Total release size: 31.1 kB
Release files / evalwatch-0.1.1.tar.gz
| Download URL | evalwatch-0.1.1.tar.gz |
|---|---|
| Size | 25.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
437801c8b33cb3ff587ab99769121b0a69eeef355798fd38d85f8eb4f7ec3b4c
|
|
BLAKE2b-256 checksum How to use checksums |
4e6cd0cab44b28e2f7e5c0278f942a4b1d83e85dacb1b78497c9c9227d2089df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / evalwatch-0.1.1-py3-none-any.whl
| Download URL | evalwatch-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4af2d722e89328ca852640e2782509017d4d0389082493ea7c40a2848d58aa23
|
|
BLAKE2b-256 checksum How to use checksums |
3bb1e6a68a3ca88cc923293bd98100486199ac542c8fd795dad9c53acc7246b3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for evalwatch 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.