Respan SDK allows you to interact with the Respan API smoothly
Project description
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},
},
},
}
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 respan_sdk-2.6.25.tar.gz.
File metadata
- Download URL: respan_sdk-2.6.25.tar.gz
- Upload date:
- Size: 40.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aa1df096d648765498a1a6623a2f770eae36d7b41f0e29d7a1bf785ed54a57e3
|
|
| MD5 |
8927219d733eeb8a249994339d11b62b
|
|
| BLAKE2b-256 |
acdaeda12dc22f6cc217d88113094f4fa5d204893605c82e8b0d4c7899ac75ac
|
Provenance
The following attestation bundles were made for respan_sdk-2.6.25.tar.gz:
Publisher:
publish.yml on respanai/respan
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
respan_sdk-2.6.25.tar.gz -
Subject digest:
aa1df096d648765498a1a6623a2f770eae36d7b41f0e29d7a1bf785ed54a57e3 - Sigstore transparency entry: 1302495366
- Sigstore integration time:
-
Permalink:
respanai/respan@76946d33e44d35cfbe2d5d456b98896289df3860 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/respanai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@76946d33e44d35cfbe2d5d456b98896289df3860 -
Trigger Event:
workflow_run
-
Statement type:
File details
Details for the file respan_sdk-2.6.25-py3-none-any.whl.
File metadata
- Download URL: respan_sdk-2.6.25-py3-none-any.whl
- Upload date:
- Size: 58.2 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 |
f06f33f20fcc6fb5db1e4b41fb38395f83b35930bb88c71f24daebe257c56da0
|
|
| MD5 |
57395d405dd80ccfefcf36bb0cec7a80
|
|
| BLAKE2b-256 |
edaacadd0282916ef8ddf95b687fe56ae0b2ad05f11fd89d1f51f43af27aeb34
|
Provenance
The following attestation bundles were made for respan_sdk-2.6.25-py3-none-any.whl:
Publisher:
publish.yml on respanai/respan
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
respan_sdk-2.6.25-py3-none-any.whl -
Subject digest:
f06f33f20fcc6fb5db1e4b41fb38395f83b35930bb88c71f24daebe257c56da0 - Sigstore transparency entry: 1302495474
- Sigstore integration time:
-
Permalink:
respanai/respan@76946d33e44d35cfbe2d5d456b98896289df3860 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/respanai
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@76946d33e44d35cfbe2d5d456b98896289df3860 -
Trigger Event:
workflow_run
-
Statement type: