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.

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-0.2.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-0.2.0-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: seerlens-0.2.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-0.2.0.tar.gz
Algorithm Hash digest
SHA256 30193a2d2133baa6cf04a60ff6a32ae1b68dd0cec56fde091a5352daaf193c21
MD5 ce002a774b87a9acab0a351079bf02b6
BLAKE2b-256 1fadebf81554658ce26da7cf16495872ceade8cb5ee086c493cb046621ee5f30

See more details on using hashes here.

File details

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

File metadata

  • Download URL: seerlens-0.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-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 716af66e824eef34108d7e7d6a790115919c79736d79a506e0b0f8221c14d1ad
MD5 a610548b4c0bb717561239d0d4a3dd53
BLAKE2b-256 c88018016598e113d527d2f094d6a7c06f80687ad5f641302460beadfc5a5e18

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