Skip to main content

capybara-sdk

Emit OpenTelemetry gen_ai.* traces to a local capybara trace debugger. Import name is capybara.

pip install capybara-sdk
import capybara
from pydantic import BaseModel

capybara.init()  # export to a local capybara on 127.0.0.1:4318


class Price(BaseModel):
    price: float
    currency: str


capybara.schema("lookup_price", Price)  # declared beats learned


@capybara.trace(tool="lookup_price")
def lookup_price(sku: str) -> dict:
    return {"price": 42.0, "currency": "USD"}

init() reuses a TracerProvider you already configured, so OpenInference or OpenLLMetry instrumentors covering OpenAI, Anthropic, or LangChain keep working; capybara only adds an OTLP exporter and the schema processor.

@capybara.trace wraps un-instrumented functions. A bare @capybara.trace records a tool span named after the function; kind="agent" or kind="llm" records other span kinds. capybara.schema(tool, model) attaches a Pydantic model's JSON Schema to that tool's spans so capybara reports contract drift on the first violating call.

Sync and async functions are both supported.

capybara.replay is invoked by the binary, not by you: pressing r in the TUI re-executes the recorded process, serving the recorded model responses and tool outputs so nothing touches the network. A call that is not in the recording stops the replay instead of running live; only model calls made after an edited value has been served are allowed to diverge.

Metadata

Release files for capybara-sdk 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for capybara-sdk 0.1.0
File Size Uploaded Provenance
capybara_sdk-0.1.0.tar.gz 73.2 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for capybara-sdk 0.1.0
File Interpreter ABI Platform
capybara_sdk-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 84.3 kB

Release files / capybara_sdk-0.1.0.tar.gz

Download URL capybara_sdk-0.1.0.tar.gz
Size 73.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b4b0f3b927aa080d7b82fa0cd59647fe025b560054dab254e1b41b5d6b7cbb86
BLAKE2b-256 checksum
How to use checksums
4f00c0e9b3645f9a79267a14390df2326eff0a5a9307a8ed2137c3ea5cf89532
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 24, 2026.

Transparency log

Release files / capybara_sdk-0.1.0-py3-none-any.whl

Download URL capybara_sdk-0.1.0-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9decbb5c617283224fef97b41f6ecc1dbde0e5909505e9bc4b998582d0bf105e
BLAKE2b-256 checksum
How to use checksums
0c897bab3ffe070c2ea50fc616be7f3ee4b57ec53aa2b26846c49e210bec8235
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.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 24, 2026.

Transparency log

Security for capybara-sdk 0.1.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.

Select from 2 files

Attestation for capybara_sdk-0.1.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 24, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page