Skip to main content

Revefi LLM SDK

A minimal Python SDK for LLM observability with Revefi's monitoring platform.

Installation

pip install revefi-llm-sdk

Quick Start

from revefi_llm_sdk import init_llm_observability

# Initialize the SDK
init_llm_observability(
    api_key="your-revefi-api-key",
    agent_name="my-llm-agent",
    ingestor_url="https://your-revefi-instance.com",
    # Send prompt and completion text to Revefi. Off by default.
    capture_content=False
)

# Your LLM calls will now be automatically tracked
import openai
client = openai.OpenAI()
response = client.chat.completions.create(
    model="gpt-3.5-turbo",
    messages=[{"role": "user", "content": "Hello!"}]
)

Configuration

  • api_key: Your Revefi API key for authentication
  • agent_name: Name identifier for your agent/application
  • ingestor_url: Revefi ingestor service URL (defaults to localhost:6556)
  • capture_content: Whether to send prompt and completion text (defaults to False). Metadata — model, token counts, latency, cost, tool names, tags — is always sent.

Supported LLM Providers

  • OpenAI
  • Anthropic

Development & Distribution

Building Distribution Files

The dist/ directory contains the distribution files that are built from the source code and uploaded to PyPI. These files are generated using Python's build tools:

# Build distribution files (generates .whl and .tar.gz files in dist/)
python -m build

# This creates:
# - dist/revefi_llm_sdk-{version}-py3-none-any.whl (wheel package)
# - dist/revefi_llm_sdk-{version}.tar.gz (source distribution)

Update the version in pyproject.toml before building to ensure the correct version is included in the distribution files.

Publishing to PyPI

The distribution files are uploaded to the Python Package Index (PyPI) registry using twine:

# Upload to PyPI (requires valid PyPI credentials)
python -m twine upload dist/*

# For testing, upload to Test PyPI first:
python -m twine upload --repository testpypi dist/*

Note: The files in dist/ are automatically generated and should not be manually edited. They are created from the source code defined in revefi_llm_sdk/ and the project configuration in pyproject.toml.

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

revefi_llm_sdk-0.2.0.tar.gz (6.5 kB view details)

Uploaded Source

Built Distribution

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

revefi_llm_sdk-0.2.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: revefi_llm_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 6.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.13

File hashes

Hashes for revefi_llm_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 160187359758a251f42849c767b9de8790778d9c8a1a12026b798167e9fea7ac
MD5 6f35393b973eff81071a7d97d7500d27
BLAKE2b-256 79a74ffa0af9da4afd864ececc0638c9763e23e7cc53161dca32b852005023ee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: revefi_llm_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.13

File hashes

Hashes for revefi_llm_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 32ceab51590c60d101c9d825112c4d784a80a08a2a2c9ee04c280c688b9799ce
MD5 9f23e3c7b6e248454f2b66c990bfb521
BLAKE2b-256 9cd0648afcdef8066cdeeedc2d902155f9876e4e161dfe4c4d5f682c43659f3c

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 Sentry Error logging StatusPage Status page