Prosperus Python SDK
Instrument your LLM applications with traces, spans, evaluations, and metrics.
Install with:
pip install prosperus
# or
uv add prosperus
The distribution name and the Python import package are both prosperus.
Quick Start
from prosperus import Prosperus, llm, workflow
ph = Prosperus(
api_key="ph-...",
app_name="my-chatbot",
endpoint="http://localhost:4100", # use your local server during development
)
ph.enable()
@workflow
def handle_request(user_msg: str) -> str:
return call_model(user_msg)
@llm(model_name="gpt-5.4", model_provider="openai")
def call_model(prompt: str) -> str:
reply = f"Echo: {prompt}"
Prosperus.annotate(
input_data=[{"role": "user", "content": prompt}],
output_data=[{"role": "assistant", "content": reply}],
metrics={"input_tokens": 5, "output_tokens": 7},
)
return reply
print(handle_request("Hello"))
ph.shutdown()
Development
cd packages/sdk-python
uv sync
uv run pytest
uv run ruff check src/
uv run mypy src/
Configuration
| Parameter | Type | Description |
|---|---|---|
api_key |
str |
API key for authentication |
app_name |
str |
Application identifier used to group traces |
endpoint |
str |
Prosperus ingest endpoint. Defaults to https://ingest.prosperus.dev |
flush_interval |
float |
Seconds between background flush attempts |
span_processor |
Callable[[SpanData], SpanData | None] | None |
Optional processor for redaction or filtering before export |
What You Can Import
The top-level package re-exports the most common SDK entry points:
from prosperus import Prosperus, llm, workflow, tool, SpanKind, SpanContext
Metadata
Release files for prosperus 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 | Actions |
|---|---|---|---|---|
| prosperus-0.1.0.tar.gz | 39.4 kB | With provenance | Details for prosperus-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| prosperus-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for prosperus-0.1.0-py3-none-any.whl |
Total release size: 49.1 kB
Release files / prosperus-0.1.0.tar.gz
| Download URL | prosperus-0.1.0.tar.gz |
|---|---|
| Size | 39.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
944a4ab3f8671a7f5b0011bb967815662aa1f4e18af5ca1838074fa1ea394519
|
|
BLAKE2b-256 checksum How to use checksums |
42438927700d3d889228a76f806ea9bc4838970651c20042d11f5862ea4d7f29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 13, 2026.
Transparency logRelease files / prosperus-0.1.0-py3-none-any.whl
| Download URL | prosperus-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
502853d463ceb2da2da847db271f2147d40133cd9118bfa30bc643db674b87bb
|
|
BLAKE2b-256 checksum How to use checksums |
bde77bf78055b5a6d65ce19e7ef584389b8c3ae3f26aacb73e628bf484ce9741
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 Apr 13, 2026.
Transparency logSecurity for prosperus 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
Both files in this release have been uploaded with provenance metadata.
Attestation for prosperus-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 Apr 13, 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.