Spano Python SDK
Spano is a lightweight Python SDK for recording AI-agent traces and exporting spans to an HTTP ingestion endpoint. This early release provides manual tracing; automatic LangChain/LangGraph instrumentation is not included yet.
Install for local development
uv sync
uv run pytest
Quick start
from spano import Spano, SpanKind
client = Spano(
api_key="your-api-key",
endpoint="http://localhost:8000",
# The server must implement POST /api/v1/traces.
)
try:
with client.start_trace("research-agent", attributes={"environment": "dev"}) as trace:
with trace.start_span("search-web", kind=SpanKind.TOOL, attributes={"tool": "web-search"}):
# Run your tool here.
pass
finally:
client.close()
Ingestion contract
Spano sends POST {endpoint}/api/v1/traces with Authorization: Bearer <api-key> and a JSON body shaped like:
{"spans": [{"trace_id": "...", "span_id": "...", "parent_span_id": null, "name": "research-agent", "kind": "agent", "start_time": "...", "end_time": "...", "duration_ms": 1.2, "status": "ok", "attributes": {}, "error": null}]}
The endpoint should return a 2xx response. If the response body is non-empty, it must be a JSON object; an optional integer accepted field should equal the number of spans in the request. This SDK does not include the backend or persist traces itself.
Buffering and failures
flush()exports buffered spans and returnsTrueon success,Falsewhen best-effort delivery fails.close()attempts to flush and is safe to call more than once.- Buffer capacity is bounded. If it fills, the oldest span is dropped and
client.dropped_spansincrements. - Transport errors are logged and passed to
on_errorif supplied. Setstrict_transport=Trueto raise transport errors fromflush()/close(). - Application exceptions are recorded in spans and re-raised; Spano does not swallow them.
- Input/output prompts and responses are not captured automatically. Only metadata explicitly provided by the developer is recorded. Do not add credentials or sensitive values to attributes.
Configuration
Spano(api_key, endpoint="http://localhost:8000", timeout=5.0, ingestion_path="/api/v1/traces", max_buffer_size=1000, batch_size=100, strict_transport=False, logger=None, on_error=None)
This package is an early alpha. Review behavior and endpoint compatibility before production use.
Metadata
Release files for spano 0.1.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 | |
|---|---|---|---|---|
| spano-0.1.0.tar.gz | 11.0 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| spano-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.8 kB
Release files / spano-0.1.0.tar.gz
| Download URL | spano-0.1.0.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
06edd7fc095bf8a9adbb32a9c919c5304ab6c40b1de311bd7788fbc227e7e344
|
|
BLAKE2b-256 checksum How to use checksums |
b64297ba093353dc292a6a554b0104fa0c096a2770e50929c878f2948490a928
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 25, 2026.
Transparency logRelease files / spano-0.1.0-py3-none-any.whl
| Download URL | spano-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5a8bb4de34a4d73381fd286395d21712767d8315be499f4460c22200a27db975
|
|
BLAKE2b-256 checksum How to use checksums |
7f3e85bf354cea9a4db660bd4e1e114bb76937450bf67d5e7a92c894b385f5ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Oct 25, 2026.
Transparency logSecurity for spano 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.
Attestation for spano-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 Oct 25, 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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.