Skip to main content

A lightweight observability wrapper for LangSmith, Langfuse, Sentry, Phoenix, and OpenTelemetry.

Project description

oaas-tool

oaas-tool is a small Python observability wrapper that lets you plug one or more providers into any project with a simple config.

Supported tools:

  • langsmith
  • langfuse
  • sentry
  • phoenix
  • otel

Install

After this repository is on GitHub, anyone can install it with:

pip install "git+https://github.com/MeghanaTathireddy/oaas-tool.git"

If you later publish it to PyPI, the install becomes:

pip install oaas-tool

Quick Start

from oaas import init, Event

obs = init(
    langsmith={
        "api_key": "your-langsmith-api-key",
        "project": "my-app",
    }
)

obs.push(Event("app_started", {"env": "dev"}))

You can also use environment variables instead of passing keys directly.

from oaas import init, Event

obs = init(
    langsmith={},
    sentry={},
)

obs.push(Event("request_received", {"route": "/chat"}))

Environment Variables

LangSmith

  • LANGSMITH_API_KEY
  • LANGSMITH_PROJECT

Langfuse

  • LANGFUSE_PUBLIC_KEY
  • LANGFUSE_SECRET_KEY
  • LANGFUSE_HOST

Sentry

  • SENTRY_DSN

Tool Selection

Users only enable the tools they want by passing those tool names into init(...).

from oaas import init

obs = init(
    sentry={"dsn": "your-dsn"},
    phoenix={},
)

If a tool needs credentials, the library expects the user's own keys through config or environment variables.

API

from oaas import init, Event, available_tools, node_start, node_end, error_event
  • init(config=None, **tool_configs) creates and starts the configured providers.
  • available_tools() returns the supported tool names.
  • Event(...) creates a custom event.
  • node_start(...), node_end(...), and error_event(...) are helper events.

Example

from oaas import init, Event

obs = init(
    langfuse={
        "public_key": "your-public-key",
        "secret_key": "your-secret-key",
    }
)

obs.push(Event("generation_completed", {"tokens": 128}))

Publish To GitHub

  1. Create a new GitHub repository.
  2. Add that GitHub repo as the remote for this project.
  3. Push your code.
  4. Create a release when you want to publish to PyPI.

Publish To PyPI Later

Once you are ready, users will be able to run pip install oaas-tool.

GitHub Actions

This repository includes:

  • CI on push and pull request
  • package build verification
  • a PyPI publish workflow triggered by GitHub releases

For PyPI publishing, configure Trusted Publishing for this GitHub repository on PyPI.

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

oaas_tool-0.1.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

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

oaas_tool-0.1.0-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for oaas_tool-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cea960cf6105aeaff647b89daf2d97b2db1f1a9c9b3edf8b06641bd5e051cbe8
MD5 4f34ac6d7b00470d9b57cd9bbe3972e5
BLAKE2b-256 b438054e867e4590460e0cfded215f9ff45f2133128fac83d7e28141a02b5a51

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on MeghanaTathireddy/oaas-tool

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

File details

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

File metadata

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

File hashes

Hashes for oaas_tool-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1de50c48a5555bb9b3b5c363eaca14c7c5ed8129e3e5b6a069e8355db175c5f9
MD5 a9678adc89b2f81e4ca49c47c69ecaf2
BLAKE2b-256 f08c8199021ee3d4ea8825d6ef33d8df2efd79aa16cffda532ea0d6591e32416

See more details on using hashes here.

Provenance

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

Publisher: publish.yml on MeghanaTathireddy/oaas-tool

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