Typed Python client for the Coval evaluation platform API.
Project description
coval-sdk (Python)
Generated Python client for the Coval evaluation platform API. Built from the public OpenAPI specs via openapi-generator.
This package is currently demo-grade: it's the generated client without a
hand-written ergonomic wrapper layer. The TypeScript SDK (@coval/sdk)
ships with auth/retry/pagination helpers — those are still in flight on the
Python side and will follow in a subsequent release.
Install
pip install coval-sdk
# For latest main before the next PyPI release:
# pip install "git+https://github.com/coval-ai/coval-examples.git#subdirectory=python-sdk"
# For local SDK development from the coval-examples repo:
# pip install -e ./python-sdk
Requires Python 3.9+.
Usage
import os
from coval_sdk import AgentsApi, ApiClient, Configuration
config = Configuration(host="https://api.coval.dev")
with ApiClient(config) as client:
# Coval's gateway requires lowercase x-api-key. The bundled spec splits
# the auth scheme per tag, so the cleanest pattern is to set the header
# directly on the client:
client.set_default_header("x-api-key", os.environ["COVAL_API_KEY"])
agents_api = AgentsApi(client)
page = agents_api.list_agents(page_size=50)
for a in page.agents:
print(a.id, a.display_name)
Run the example
COVAL_API_KEY=... python examples/list_agents.py
COVAL_API_KEY=... python examples/list_agents.py --raw # bypass pydantic validation
Why --raw exists
The generated models enforce strict pydantic validation on responses
(including regex patterns on IDs). If your org has any historical data that
predates the current spec — for instance, an agent_id that doesn't match
the ^[A-Za-z0-9]{22}$ regex — pydantic will raise a ValidationError
mid-stream. The --raw flag falls back to
list_agents_without_preload_content() which returns the raw HTTP response,
so you can parse it manually.
For production use, prefer the typed call. If you hit ValidationErrors, file a docs/spec issue so we can either fix the data or relax the constraint.
What's in the box
- 21 typed API classes (
AgentsApi,ConversationsApi,MetricsApi, …) - Pydantic v2 models for every request and response shape
urllib3-based transport
Regenerating
From the repo root:
node scripts/bundle-spec.mjs
bash scripts/generate-sdks.sh
License
MIT.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file coval_sdk-0.2.0.tar.gz.
File metadata
- Download URL: coval_sdk-0.2.0.tar.gz
- Upload date:
- Size: 178.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e2941872a8ec2752a960cb879ef5c03d5609bafe1d33cb65131f8b6b9e7c558
|
|
| MD5 |
70505858db547a351cdc2c26d17ba021
|
|
| BLAKE2b-256 |
87755abdbe8d3899a0150c6af65da5853d8dbb7d3b310151cbdd582066be50b7
|
Provenance
The following attestation bundles were made for coval_sdk-0.2.0.tar.gz:
Publisher:
publish-coval-sdk.yml on coval-ai/coval-examples
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coval_sdk-0.2.0.tar.gz -
Subject digest:
0e2941872a8ec2752a960cb879ef5c03d5609bafe1d33cb65131f8b6b9e7c558 - Sigstore transparency entry: 1528320165
- Sigstore integration time:
-
Permalink:
coval-ai/coval-examples@dc4175c1c6f00b768ceaaa08c4e93598f5d91515 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/coval-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-coval-sdk.yml@dc4175c1c6f00b768ceaaa08c4e93598f5d91515 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file coval_sdk-0.2.0-py3-none-any.whl.
File metadata
- Download URL: coval_sdk-0.2.0-py3-none-any.whl
- Upload date:
- Size: 552.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60fea71a44da8ee8bcaf9439f8e6347e2b01376d249f545a4aab4d62e8d77812
|
|
| MD5 |
1d2fc6c95a4be6cb302082b0336eaa48
|
|
| BLAKE2b-256 |
0b690fa0417456d3273fcfc1bee926b4017600ef6347f8f9922dcd720fbfbfd0
|
Provenance
The following attestation bundles were made for coval_sdk-0.2.0-py3-none-any.whl:
Publisher:
publish-coval-sdk.yml on coval-ai/coval-examples
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coval_sdk-0.2.0-py3-none-any.whl -
Subject digest:
60fea71a44da8ee8bcaf9439f8e6347e2b01376d249f545a4aab4d62e8d77812 - Sigstore transparency entry: 1528320242
- Sigstore integration time:
-
Permalink:
coval-ai/coval-examples@dc4175c1c6f00b768ceaaa08c4e93598f5d91515 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/coval-ai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-coval-sdk.yml@dc4175c1c6f00b768ceaaa08c4e93598f5d91515 -
Trigger Event:
workflow_dispatch
-
Statement type: