Metadata-Version: 2.4
Name: oaas-tool
Version: 0.1.0
Summary: A lightweight observability wrapper for LangSmith, Langfuse, Sentry, Phoenix, and OpenTelemetry.
Author: Meghana
License: MIT
Project-URL: Homepage, https://github.com/MeghanaTathireddy/oaas-tool
Project-URL: Repository, https://github.com/MeghanaTathireddy/oaas-tool.git
Project-URL: Issues, https://github.com/MeghanaTathireddy/oaas-tool/issues
Keywords: observability,langsmith,langfuse,sentry,opentelemetry,phoenix
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: sentry-sdk
Requires-Dist: opentelemetry-api==1.22.0
Requires-Dist: opentelemetry-sdk==1.22.0
Requires-Dist: opentelemetry-exporter-otlp==1.22.0
Requires-Dist: langfuse<3
Requires-Dist: arize-phoenix
Requires-Dist: langsmith
Requires-Dist: pytz
Dynamic: license-file

# 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:

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

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

```bash
pip install oaas-tool
```

## Quick Start

```python
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.

```python
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(...)`.

```python
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

```python
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

```python
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.
