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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file seerlens-1.1.0.tar.gz.
File metadata
- Download URL: seerlens-1.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e25de32a0f34451b8d70bbc6f66a4b291a2aab96085fc102bf71785ce15cf27
|
|
| MD5 |
ee63e57f82f86b204c4d6228f893cb20
|
|
| BLAKE2b-256 |
73a2882d12299fef43846796a1354dad6bd8340b7e4cda9909be858437afb690
|
File details
Details for the file seerlens-1.1.0-py3-none-any.whl.
File metadata
- Download URL: seerlens-1.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e87e852dc6b93a72d819d5205763d928216aefae9ff521303cc41c76cd26d185
|
|
| MD5 |
ef1fd7988bfcf84195f811b12501ac7f
|
|
| BLAKE2b-256 |
1b04f00b20d73a01aade877f6a9a38dde9b23ab351f8b43052ee313d53d1fada
|