Skip to main content

TraceLite

Lightweight LLM observability SDK with vector semantic caching using PostgreSQL (pgvector) and Redis.

Features

  • Async Telemetry: Logs token usage, cost, latency, and TTFT in background threads.
  • Two-Tier Caching: Exact hash caching (Redis) + Semantic vector caching (pgvector).
  • Fallback Token Counting: Uses tiktoken if native usage streaming metadata is omitted.

Installation

pip install tracelite
from tracelite.client import ObservedOpenAI

client = ObservedOpenAI(
    api_key="your-openai-api-key",
    db_url="postgresql://tracelite:secretpassword@localhost:5432/llm_observability"
)

response = client.chat_completion(
    model="gpt-4o-mini",
    messages=[{"role": "user", "content": "Hello world!"}]
)

print(response.choices[0].message.content)

Release files for tracelite 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tracelite 0.1.9
File Size Uploaded
tracelite-0.1.9.tar.gz 6.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tracelite 0.1.9
File Interpreter ABI Platform
tracelite-0.1.9-py3-none-any.whl Python 3 none any Details

Total release size: 14.6 kB

Release files / tracelite-0.1.9.tar.gz

Download URL tracelite-0.1.9.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
95397231158946ba1a4b6ae79c9345da1473528f410441123b0d3cbcdffa02d8
BLAKE2b-256 checksum
How to use checksums
f071adaba6301d8e491cc233ded167a3a285349282e6a09e7fd159ee7c584233
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release files / tracelite-0.1.9-py3-none-any.whl

Download URL tracelite-0.1.9-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
72f0fe8dc1d1c1b4ae18fce2cbfa90a93a6efbab745ebae928ade7132a5a87e9
BLAKE2b-256 checksum
How to use checksums
2c8fb2d78b71dc9327c1cb146228dc0d97ca961f45ce638a03117e97e246e140
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.9 This release

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page