Skip to main content

Litmus Python SDK - implicit evals for AI products

Project description

litmus-sdk

Python SDK for Litmus - implicit evals for AI products.

Install

pip install litmus-sdk

Quick start

from litmus import LitmusClient

client = LitmusClient(api_key="ltm_pk_live_...")

# Track a generation and user signals
gen = client.generation("session-123", prompt_id="content_gen")
gen.accept()
gen.edit(edit_distance=0.3)

# Flush before exit (serverless, scripts, etc.)
client.shutdown()

How it works

Events are queued in memory and shipped to the Litmus ingest API on a background thread. Batches are sent every 0.5s or when 100 events accumulate (both configurable). The consumer retries transient failures with exponential backoff.

For serverless environments, pass sync_mode=True to send inline.

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

litmus_python_sdk-0.1.0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

litmus_python_sdk-0.1.0-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file litmus_python_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: litmus_python_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for litmus_python_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4c37d191a0f6b344a15516f8410b83778dbbbed4a02be8f2a081cd3ae344866c
MD5 8a0084e3d8df63c288d04c880ff3c17b
BLAKE2b-256 a9859c7ec3350dab478753c22af01421b0fd6b3e9bbfdd04b47fef5a8cd97f6f

See more details on using hashes here.

File details

Details for the file litmus_python_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: litmus_python_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for litmus_python_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 25b906bbc4ba3f9cfab0d7a1fa090e26146e727ff88424715ac01b8361686621
MD5 b9c1f5aaa719cf81ff0bcd731548fd0b
BLAKE2b-256 7a6175db514c04f30d1f103dce5ebdb2885e85b99372cdef60d858db256c1b52

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