Skip to main content

Ergonomic LLM observability wrapper around Langfuse

Project description

AviаraEye

Ergonomic LLM observability wrapper around Langfuse. Provides tracing, prompt management, scoring, and auto-instrumentation for OpenAI, Azure OpenAI, and Google Gemini.

Installation

pip install aviaraeye[all]

# Or with uv
uv pip install aviaraeye[all]

# Individual providers
pip install aviaraeye[openai]   # OpenAI
pip install aviaraeye[azure]    # Azure OpenAI
pip install aviaraeye[gemini]   # Google Gemini

Configuration

Set environment variables:

export LANGFUSE_PUBLIC_KEY="pk-lf-..."
export LANGFUSE_SECRET_KEY="sk-lf-..."
export LANGFUSE_HOST="https://aviaraeye.aviaralabs.com"

Quick Start

from aviaraeye import AviaraEye, traced, observe, get_prompt
from aviaraeye.providers.openai import OpenAI

# Initialize
eye = AviaraEye()

# Auto-traced OpenAI calls
client = OpenAI()

with traced("my-pipeline", user_id="user-1", tags=["demo"]) as t:
    response = client.chat.completions.create(
        model="gpt-4",
        messages=[{"role": "user", "content": "Hello!"}],
    )
    t.set_output(response.choices[0].message.content)
    t.score("quality", 1.0)

# Decorator-based tracing
@observe
def process_document(doc: bytes) -> dict:
    return extract(doc)

# Prompt management
prompt = get_prompt("extraction-v2", label="production")
compiled = prompt.compile(schema=my_schema)

# Flush before shutdown
eye.flush()

Features

Feature Description
Tracing traced(), span(), event() context managers
Decorators @observe, @generation for auto-tracing functions
Providers Drop-in OpenAI, Azure OpenAI, Gemini auto-instrumentation
Prompts Versioned prompt fetch, compile, and link to traces
Scoring Numeric, boolean, categorical, and text scores
Sessions session_context() for user/session propagation
Metadata Metadata, Tags builders for standardised annotation

Provider Usage

OpenAI / Azure OpenAI

from aviaraeye.providers.openai import OpenAI
from aviaraeye.providers.azure_openai import AzureOpenAI

# Drop-in — all calls auto-traced
client = OpenAI()
response = client.chat.completions.create(model="gpt-4", messages=[...])

Google Gemini

from aviaraeye.providers.gemini import instrument_gemini
from google import genai

instrument_gemini()  # One-time setup (auto-called by AviaraEye())

client = genai.Client(api_key="...")
response = client.models.generate_content(model="gemini-2.5-flash", contents="...")

Documentation

Development

# Install in editable mode with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Lint
ruff check src/

# Type check
mypy src/

License

MIT - Aviara Labs

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

aviaraeye-0.1.0.tar.gz (19.1 kB view details)

Uploaded Source

Built Distribution

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

aviaraeye-0.1.0-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aviaraeye-0.1.0.tar.gz
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aviaraeye-0.1.0.tar.gz
Algorithm Hash digest
SHA256 eb6cbfb13d615dc2901591c70b45fc9cb1063e919d0677cbfdf7ccbd3122c810
MD5 9959173d62f83e5044e6de656e2ffa88
BLAKE2b-256 38dfe10cc309f83f529493e26a9f7b1c6de4e6497550c211e7e9e1b738c4285e

See more details on using hashes here.

Provenance

The following attestation bundles were made for aviaraeye-0.1.0.tar.gz:

Publisher: publish.yml on KushalFrameDx/aviaraeye

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: aviaraeye-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 18.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aviaraeye-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a51a0511a0e00a56f2193432b20dee116765a6bf18ea9ac185fbe89e09788eb8
MD5 4780cc1b9dcc7bf2f580008105b5f8d9
BLAKE2b-256 8f204e1a95442f677e03e3ea891268d2c3f2fac25ac4a5b2b4c34c3352397b07

See more details on using hashes here.

Provenance

The following attestation bundles were made for aviaraeye-0.1.0-py3-none-any.whl:

Publisher: publish.yml on KushalFrameDx/aviaraeye

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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