coval-sdk (Python)
Typed Python client for the Coval evaluation platform
API. The API classes and Pydantic v2 models are generated from the same public
OpenAPI specs that power the API reference. CovalClient adds authentication,
safe retries, pagination, and one entry point for every public v1 resource.
Install
pip install coval-sdk
Requires Python 3.9+.
Quick start
import os
from coval_sdk import CovalClient, paginate
with CovalClient(os.environ["COVAL_API_KEY"]) as coval:
for agent in paginate(
coval.agents.list_agents,
items_field="agents",
page_size=50,
):
print(agent.id, agent.display_name)
The client sends the required lowercase x-api-key header and defaults to
https://api.coval.dev/v1.
Retries
GET, HEAD, and OPTIONS requests retry 408, 429, and transient 5xx
responses up to three total attempts with exponential backoff. Mutating
requests are not retried by default, which avoids duplicating side effects.
from coval_sdk import CovalClient
# Disable transport retries.
coval = CovalClient(api_key, retries=False)
# Use a custom base URL.
staging = CovalClient(api_key, base_url="https://staging.api.coval.dev/v1")
Generated client
All generated API classes, models, ApiClient, Configuration, and typed
exceptions remain available for lower-level usage:
from coval_sdk import AgentsApi, ApiClient, Configuration
config = Configuration(host="https://api.coval.dev/v1")
with ApiClient(config) as client:
client.set_default_header("x-api-key", api_key)
page = AgentsApi(client).list_agents(page_size=50)
Malformed list resources
List responses validate each resource independently. If one resource does not
match the published schema, the SDK omits that item, returns the remaining
typed resources, and emits InvalidListItemWarning. The warning identifies the
response field and list index but does not include resource contents.
Applications that prefer strict failure can enable it on the client:
from coval_sdk import CovalClient
coval = CovalClient(api_key, strict_response_validation=True)
Single-resource and malformed top-level responses still raise Pydantic validation errors.
What's included
- 25 typed API classes, including agents, conversations, runs, run templates, metrics, monitors, reports, tags, webhooks, and organization configuration
- Pydantic v2 request and response models
- Lowercase API-key authentication and connection pooling
- Safe retry and token-pagination helpers
- Warning-backed isolation for malformed resources in list responses
Development
From the repository root:
COVAL_SPECS_DIR=../docs/api-reference/v1 node scripts/bundle-spec.mjs
bash scripts/generate-sdks.sh
python -m pytest python-sdk/tests
License
MIT.
Metadata
Release files for coval-sdk 0.4.0
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 | |
|---|---|---|---|---|
| coval_sdk-0.4.0.tar.gz | 272.3 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| coval_sdk-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.1 MB
Release files / coval_sdk-0.4.0.tar.gz
| Download URL | coval_sdk-0.4.0.tar.gz |
|---|---|
| Size | 272.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6ad4f36febad486140220aee8f50990e6049380d482f2d8c2b444b8a9026389b
|
|
BLAKE2b-256 checksum How to use checksums |
a80d65aa0e4fe1e1134346cbf750e35d89df3d2965c1e2a3dcbdc1c0db471e57
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 29, 2026.
Transparency logRelease files / coval_sdk-0.4.0-py3-none-any.whl
| Download URL | coval_sdk-0.4.0-py3-none-any.whl |
|---|---|
| Size | 827.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
661059bf31bd38770838f4d926985ca898b82b9dba1478127cbc7c8e803a3530
|
|
BLAKE2b-256 checksum How to use checksums |
f7692d22b4a07160773d54f5ab243027a97fde76f7bd5bdaf87a523b955202eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 29, 2026.
Transparency logSecurity for coval-sdk 0.4.0
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for coval_sdk-0.4.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 29, 2026.
Transparency logA 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.