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

Release files for revefi-llm-sdk 0.2.1

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

Source distribution (sdist)

Source distribution for revefi-llm-sdk 0.2.1
File Size Uploaded
revefi_llm_sdk-0.2.1.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for revefi-llm-sdk 0.2.1
File Interpreter ABI Platform
revefi_llm_sdk-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 14.2 kB

Release files / revefi_llm_sdk-0.2.1.tar.gz

Download URL revefi_llm_sdk-0.2.1.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
3e29984a65f6428ac44d692bcf8c15a001b46cdc5a2e90d21bde8fd5b06d1f6f
BLAKE2b-256 checksum
How to use checksums
f8d2dfcb4e6d6fe19b7ce957fdefee3ede81e8a8f6799ad8085389650651f353
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.13

Release files / revefi_llm_sdk-0.2.1-py3-none-any.whl

Download URL revefi_llm_sdk-0.2.1-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b441ec5371d457696f20d05a69815ae827a44365bb5cc85c436cb2b8f3f21589
BLAKE2b-256 checksum
How to use checksums
8714746bb1017d7fd9f297edc39566d2124da95e22359903c0b5ceb7ba102215
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.13

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

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