Skip to main content

seerlens (Python)

Send your Python app's LLM calls to Seerlens. Traces go out as OpenTelemetry GenAI spans, so they land in the same dashboard as the .NET ones.

Seerlens

pip install seerlens
import seerlens

seerlens.configure("http://localhost:5005")

with seerlens.trace("answer ticket", model="gpt-4o") as span:
    reply = my_llm(prompt)
    span.complete(prompt=prompt, completion=reply, input_tokens=40, output_tokens=12)

seerlens.flush()  # before a short script exits

Or record a call you already made:

seerlens.record(model="gpt-4o", prompt="hi", completion="hello",
                input_tokens=10, output_tokens=5, duration_ms=820)

Traces are sent on a background thread. If the collector is down the trace is dropped; it never blocks or throws into your app.

No third-party dependencies. Run the example against a running collector:

python example.py

Metadata

Release files for seerlens 1.4.0

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

Source distribution (sdist)

Source distribution for seerlens 1.4.0
File Size Uploaded
seerlens-1.4.0.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for seerlens 1.4.0
File Interpreter ABI Platform
seerlens-1.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 6.5 kB

Release files / seerlens-1.4.0.tar.gz

Download URL seerlens-1.4.0.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b3a98eca2883ebb617cccd2caa4fe168f9cb4dcce6dfcec25c6e16999773d9fc
BLAKE2b-256 checksum
How to use checksums
202ef317550cbbf701288c70fb469e81e81d7709203b35914658d72ca23f8b53
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / seerlens-1.4.0-py3-none-any.whl

Download URL seerlens-1.4.0-py3-none-any.whl
Size 3.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ad7a37118f5df88c8d925948e648017b7bd52ca236d49a34f7d58402715ace0
BLAKE2b-256 checksum
How to use checksums
4cf3cd27d7eb5b8ea92ed33b064ffa4a0cff62ab1562def31fab7ac65a97b1a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release history Release notifications | RSS feed

1.5.0

2 release files

This release

1.4.0 This release

2 release files

1.3.0

2 release files

1.2.0

2 release files

1.1.0

2 release files

1.0.0

2 release files

0.2.0

2 release files

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