Skip to main content

Send your Python app's LLM calls to Seerlens, the local DevTools for AI calls.

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

seerlens-1.2.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

seerlens-1.2.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

Details for the file seerlens-1.2.0.tar.gz.

File metadata

  • Download URL: seerlens-1.2.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for seerlens-1.2.0.tar.gz
Algorithm Hash digest
SHA256 1b7ea2b6c5ddcb353ad037ebe040b72a0da01f539990d431b278a35dff4e9816
MD5 86f273f414d674cee962a23a4d7d54c7
BLAKE2b-256 d0c133f1dc944e4b41d1ad8a2c2cd0c1cbbe243b41c60c99eabcd129a26bb567

See more details on using hashes here.

File details

Details for the file seerlens-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: seerlens-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 3.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for seerlens-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9982ed7380d37ae680463e7b256c3c5af427f53303b23ba58cdec28d21ae988b
MD5 d2b74725cfc4b54726bd11d3f075cb86
BLAKE2b-256 339349338fd6cac3c33c3c70b7f4d44923f60e629d551cf3ec29ac696cc899f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page