Respan SDK
respan.ai | Documentation | PyPI
Light weight library for Respan type definitions and API payload preprocessing
Features:
- Definition of types, what data structure Respan expects to receive in API calls.
- Preprocessing, separating Respan-specific parameters from LLM-specific parameters
- Conversion, converting input types from Anthropic API format into OpenAI API format.
- Filter types — typed vocabulary for the Respan filter system, shared across BE and SDKs.
For tracing, please go to Respan Tracing instead.
Filter Types
The SDK exports the full Respan filter vocabulary so every package (backend, tracing, exporters) uses the same typed definitions instead of raw dicts.
from respan_sdk import (
# TypedDict versions (lightweight, no validation)
FilterParamDict, # Dict[str, MetricFilterParam | List[MetricFilterParam] | FilterBundle]
MetricFilterParam, # Single filter condition (operator + value)
FilterBundle, # Nested group with connector (AND/OR)
# Pydantic versions (with validation)
FilterParamDictPydantic,
MetricFilterParamPydantic,
FilterBundlePydantic,
# Value type
MetricFilterValueType, # Union[str, int, float, bool, List[...]]
)
Operators — the full operator vocabulary available in operator field:
| Category | Operators |
|---|---|
| Equality | "", "=", "==", "eq", "equals" |
| Negation | "not" |
| Numeric | "gt", "gte", "lt", "lte" |
| String | "contains", "icontains", "startswith", "endswith", "ilike", "regex" |
| Membership | "in" |
| Null/Empty | "isnull", "empty", "notEmpty", "not_empty" |
| Search | "trigram_word_similar", "full_text_search" |
Example — filter spans by status:
export_filter: FilterParamDict = {
"status_code": {"operator": "", "value": "ERROR"},
}
Example — numeric range:
export_filter: FilterParamDict = {
"latency": {"operator": "gte", "value": 1000},
}
Example — nested bundle with OR:
export_filter: FilterParamDict = {
"model": {"operator": "in", "value": ["gpt-4", "claude-3"]},
"filter_bundle": {
"connector": "OR",
"filter_params": {
"status_code": {"operator": "", "value": "ERROR"},
"latency": {"operator": "gte", "value": 5000},
},
},
}
Metadata
Release files for respan-sdk 2.7.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| respan_sdk-2.7.6.tar.gz | 41.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| respan_sdk-2.7.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 99.8 kB
Release files / respan_sdk-2.7.6.tar.gz
| Download URL | respan_sdk-2.7.6.tar.gz |
|---|---|
| Size | 41.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
38dbda87b46eaff8d37205d2fa3005781b34a351e30f3a794ab5e64deee8362a
|
|
BLAKE2b-256 checksum How to use checksums |
5572b82141aae9d38bc5dc8eab28835de9843e0b62f7323d3c54ba9b81cdf157
|
| 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 Aug 21, 2026.
Transparency logRelease files / respan_sdk-2.7.6-py3-none-any.whl
| Download URL | respan_sdk-2.7.6-py3-none-any.whl |
|---|---|
| Size | 58.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d175a6e8cc856876155aa3f7d2940f2d2abf2b9830a7921ceda2b7c16379fd03
|
|
BLAKE2b-256 checksum How to use checksums |
3659e8159ac99c8c9a4ac4616230b3b9b8317df865641eb7f950fefb6777df5e
|
| 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 Aug 21, 2026.
Transparency log