Skip to main content

senzu-sdk

Python SDK for the Senzu AI observability platform.

Installation

pip install senzu-sdk                    # core
pip install "senzu-sdk[anthropic]"       # + Anthropic auto-tracking
pip install "senzu-sdk[openai]"          # + OpenAI auto-tracking
pip install "senzu-sdk[langchain]"       # + LangChain callback handler
pip install "senzu-sdk[all]"             # everything

Quick start

import senzu

client = senzu.SenzuClient({
    "api_key": "your-api-key",
    "agent_id": "your-agent-id",
    "org_id": "your-org-id",
})

# High-level API with automatic context propagation
async def handle_request():
    async with client.run({"session_id": "abc"}) as run:
        step = run.start_step({"name": "fetch", "step_type": "tool"})
        result = await step.track_tool({"tool_name": "search", "fn": search})
        await step.end()

# Anthropic auto-tracking
from anthropic import AsyncAnthropic
from senzu.integrations.anthropic import WrapAnthropicOptions, wrap_anthropic

anthropic = wrap_anthropic(
    AsyncAnthropic(),
    WrapAnthropicOptions(client=client),
)

async def chat():
    async with client.run({}) as run:
        # messages.create() is tracked automatically
        return await anthropic.messages.create(
            model="claude-sonnet-4-6",
            max_tokens=1024,
            messages=[{"role": "user", "content": "Hello"}],
        )

Environment variables

Variable Description
SENZU_API_KEY API key
SENZU_BASE_URL API base URL (default: http://localhost:3001)
SENZU_AGENT_ID Agent ID
SENZU_ORG_ID Organisation ID

Use from_env=True to load from environment:

client = senzu.SenzuClient({"from_env": True})

License

MIT

Metadata

Release files for senzu-sdk 0.5.2

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

Source distribution (sdist)

Source distribution for senzu-sdk 0.5.2
File Size Uploaded Provenance Actions
senzu_sdk-0.5.2.tar.gz 19.3 kB Without provenance Details for senzu_sdk-0.5.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for senzu-sdk 0.5.2
File Interpreter ABI Platform Actions
senzu_sdk-0.5.2-py3-none-any.whl Python 3 none any Details for senzu_sdk-0.5.2-py3-none-any.whl

Total release size: 39.1 kB

Release files / senzu_sdk-0.5.2.tar.gz

Download URL senzu_sdk-0.5.2.tar.gz
Size 19.3 kB
Tags Source
SHA-256 checksum
How to use checksums
edf28f502ad48c08e5a9d2c9de092fd0486c694f9f42c5ec14bc6b7991751219
BLAKE2b-256 checksum
How to use checksums
9dec0e977c80ded0002e1fbcea6a70c7a385996d710659b6ddd2e653b5dfb80f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.21

Release files / senzu_sdk-0.5.2-py3-none-any.whl

Download URL senzu_sdk-0.5.2-py3-none-any.whl
Size 19.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
edfd3c6f8497de6c4831c4be380d6d0242b7a70dde07bfe0f6d8ae00695727db
BLAKE2b-256 checksum
How to use checksums
84c9054f3cccea370d99a01ef41f5132379492a148ca859c9c883f32ef6b0688
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.21

Security for senzu-sdk 0.5.2

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.5.2 This release

2 release files No 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