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.

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.0.0.tar.gz (3.3 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.0.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for seerlens-1.0.0.tar.gz
Algorithm Hash digest
SHA256 72424216badebcf962134d2ed5cb1962dd0d55dc85581c64a6ddcc68a8c0ff63
MD5 d9137a13c07f9ff28a97cefff8447cdd
BLAKE2b-256 ddf711b0a132c5258e2da28be6b20f73ab7f546a2958b2125b10a3e448b2244d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: seerlens-1.0.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.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 646b190126fe800626eb1a805aa1f6ace1b2878ea518e011bb731d47d239257d
MD5 0470c7c256833f4de995a45c3c8a2d6d
BLAKE2b-256 351c8f1190c49941a2205a6a1b27ab4db0e844de0e94de247ad688c5bc63c79b

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