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

Uploaded Python 3

File details

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

File metadata

  • Download URL: seerlens-1.3.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.3.0.tar.gz
Algorithm Hash digest
SHA256 082ee93e4773fa738ba40fb62a3380c43dfc9a80f97a70340c0fa9168cef9ac3
MD5 3912b2eedca23e97ec8f5aa5f69331eb
BLAKE2b-256 9532a003e7d67837d47249810a22c3789767199862617aacb214b6298a87fddb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: seerlens-1.3.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.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 54c2d8df08c2c8540487eac8e5b18b3991a565460fd6840250ba4bcfb2107ba8
MD5 157300af823ad66c747c6068fb57b0d8
BLAKE2b-256 cf17dfed67d2b8a37409348f8a88648334ece6972ad99617d596f43c0533031c

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