Metadata-Version: 2.4
Name: botanu
Version: 0.1.dev68
Summary: OpenTelemetry-native run-level cost attribution for AI workflows
Project-URL: Homepage, https://github.com/botanu-ai/botanu-sdk-python
Project-URL: Documentation, https://docs.botanu.ai
Project-URL: Repository, https://github.com/botanu-ai/botanu-sdk-python
Project-URL: Changelog, https://github.com/botanu-ai/botanu-sdk-python/blob/main/CHANGELOG.md
Project-URL: Issues, https://github.com/botanu-ai/botanu-sdk-python/issues
Author-email: The Botanu Authors <oss@botanu.ai>
License-Expression: Apache-2.0
License-File: LICENSE
License-File: NOTICE
Keywords: ai,cost-attribution,llm,mlops,observability,opentelemetry,tracing
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Monitoring
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: opentelemetry-api>=1.20.0
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.20.0
Requires-Dist: opentelemetry-instrumentation-aio-pika>=0.41b0
Requires-Dist: opentelemetry-instrumentation-aiohttp-client>=0.41b0
Requires-Dist: opentelemetry-instrumentation-aiohttp-server>=0.41b0
Requires-Dist: opentelemetry-instrumentation-aiokafka>=0.41b0
Requires-Dist: opentelemetry-instrumentation-aiopg>=0.41b0
Requires-Dist: opentelemetry-instrumentation-anthropic>=0.1b0; python_version >= '3.10'
Requires-Dist: opentelemetry-instrumentation-asyncpg>=0.41b0
Requires-Dist: opentelemetry-instrumentation-boto3sqs>=0.41b0
Requires-Dist: opentelemetry-instrumentation-botocore>=0.41b0
Requires-Dist: opentelemetry-instrumentation-cassandra>=0.41b0
Requires-Dist: opentelemetry-instrumentation-celery>=0.41b0
Requires-Dist: opentelemetry-instrumentation-confluent-kafka>=0.41b0
Requires-Dist: opentelemetry-instrumentation-crewai>=0.1b0; python_version >= '3.10'
Requires-Dist: opentelemetry-instrumentation-django>=0.41b0
Requires-Dist: opentelemetry-instrumentation-elasticsearch>=0.41b0
Requires-Dist: opentelemetry-instrumentation-falcon>=0.41b0
Requires-Dist: opentelemetry-instrumentation-fastapi>=0.41b0
Requires-Dist: opentelemetry-instrumentation-flask>=0.41b0
Requires-Dist: opentelemetry-instrumentation-google-generativeai>=0.1b0; python_version >= '3.10'
Requires-Dist: opentelemetry-instrumentation-grpc>=0.41b0
Requires-Dist: opentelemetry-instrumentation-httpx>=0.41b0
Requires-Dist: opentelemetry-instrumentation-kafka-python>=0.41b0
Requires-Dist: opentelemetry-instrumentation-langchain>=0.1b0; python_version >= '3.10'
Requires-Dist: opentelemetry-instrumentation-logging>=0.41b0
Requires-Dist: opentelemetry-instrumentation-mysql>=0.41b0
Requires-Dist: opentelemetry-instrumentation-mysqlclient>=0.41b0
Requires-Dist: opentelemetry-instrumentation-ollama>=0.1b0
Requires-Dist: opentelemetry-instrumentation-openai-v2>=2.0b0
Requires-Dist: opentelemetry-instrumentation-pika>=0.41b0
Requires-Dist: opentelemetry-instrumentation-psycopg2>=0.41b0
Requires-Dist: opentelemetry-instrumentation-psycopg>=0.41b0
Requires-Dist: opentelemetry-instrumentation-pymemcache>=0.41b0
Requires-Dist: opentelemetry-instrumentation-pymongo>=0.41b0
Requires-Dist: opentelemetry-instrumentation-pymysql>=0.41b0
Requires-Dist: opentelemetry-instrumentation-pyramid>=0.41b0
Requires-Dist: opentelemetry-instrumentation-redis>=0.41b0
Requires-Dist: opentelemetry-instrumentation-requests>=0.41b0
Requires-Dist: opentelemetry-instrumentation-sqlalchemy>=0.41b0
Requires-Dist: opentelemetry-instrumentation-sqlite3>=0.41b0
Requires-Dist: opentelemetry-instrumentation-starlette>=0.41b0
Requires-Dist: opentelemetry-instrumentation-threading>=0.41b0
Requires-Dist: opentelemetry-instrumentation-tornado>=0.41b0
Requires-Dist: opentelemetry-instrumentation-tortoiseorm>=0.41b0
Requires-Dist: opentelemetry-instrumentation-urllib3>=0.41b0
Requires-Dist: opentelemetry-instrumentation-urllib>=0.41b0
Requires-Dist: opentelemetry-instrumentation-vertexai>=0.1b0; python_version >= '3.10'
Requires-Dist: opentelemetry-instrumentation>=0.41b0
Requires-Dist: opentelemetry-sdk>=1.20.0
Provides-Extra: aws
Requires-Dist: opentelemetry-resource-detector-aws>=0.1b0; extra == 'aws'
Provides-Extra: azure
Requires-Dist: opentelemetry-resource-detector-azure>=0.1b0; extra == 'azure'
Provides-Extra: cloud
Requires-Dist: opentelemetry-resource-detector-aws>=0.1b0; extra == 'cloud'
Requires-Dist: opentelemetry-resource-detector-azure>=0.1b0; extra == 'cloud'
Requires-Dist: opentelemetry-resource-detector-container>=0.1b0; extra == 'cloud'
Requires-Dist: opentelemetry-resource-detector-gcp>=0.1b0; extra == 'cloud'
Provides-Extra: container
Requires-Dist: opentelemetry-resource-detector-container>=0.1b0; extra == 'container'
Provides-Extra: dev
Requires-Dist: coverage[toml]>=7.0; extra == 'dev'
Requires-Dist: httpx<0.28.0,>=0.24.0; extra == 'dev'
Requires-Dist: mypy>=1.7.0; extra == 'dev'
Requires-Dist: pre-commit>=3.5.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
Requires-Dist: pytest-cov>=4.1.0; extra == 'dev'
Requires-Dist: pytest>=7.4.0; extra == 'dev'
Requires-Dist: ruff>=0.4.0; extra == 'dev'
Requires-Dist: starlette<0.30.0,>=0.27.0; extra == 'dev'
Provides-Extra: gcp
Requires-Dist: opentelemetry-resource-detector-gcp>=0.1b0; extra == 'gcp'
Description-Content-Type: text/markdown

# botanu SDK for Python

[![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](./LICENSE)

[botanu](https://botanu.ai/) is platform that helps AI companies understand the real cost of their AI features per customer, enabling outcome-based pricing and smarter scaling.
This SDK is built on [OpenTelemetry](https://opentelemetry.io/) for event-level cost attribution for AI workflow. For more email- deborah@botanu.ai


## Getting Started



An **event** is one business transaction — resolving a support ticket, processing
an order, generating a report. Each event may involve multiple **runs** (LLM calls,
retries, sub-workflows) across multiple services. By correlating every run to a
stable `event_id`, botanu gives you per-event cost attribution and outcome
tracking without sampling artifacts.

```bash
pip install botanu
```

One install. Includes OTel SDK, OTLP exporter, and auto-instrumentation for
50+ libraries.

```python
from botanu import enable, botanu_workflow, emit_outcome

enable()  # reads config from environment variables

@botanu_workflow("my-workflow", event_id="evt-001", customer_id="cust-42")
async def do_work():
    result = await do_something()
    emit_outcome("success")
    return result
```

Entry points use `@botanu_workflow`. Every other service only needs `enable()`.
All configuration is via environment variables — zero hardcoded values in code.

See the [Quick Start](./docs/getting-started/quickstart.md) guide for a full walkthrough.

## Documentation

| Topic | Description |
|-------|-------------|
| [Installation](./docs/getting-started/installation.md) | Install and configure the SDK |
| [Quick Start](./docs/getting-started/quickstart.md) | Get up and running in 5 minutes |
| [Configuration](./docs/getting-started/configuration.md) | Environment variables and options |
| [Core Concepts](./docs/concepts/) | Events, runs, context propagation, architecture |
| [LLM Tracking](./docs/tracking/llm-tracking.md) | Track model calls and token usage |
| [Data Tracking](./docs/tracking/data-tracking.md) | Database, storage, and messaging |
| [Outcomes](./docs/tracking/outcomes.md) | Record business outcomes for ROI |
| [Auto-Instrumentation](./docs/integration/auto-instrumentation.md) | Supported libraries and frameworks |
| [Kubernetes](./docs/integration/kubernetes.md) | Zero-code instrumentation at scale |
| [API Reference](./docs/api/) | Decorators, tracking API, configuration |
| [Best Practices](./docs/patterns/best-practices.md) | Recommended patterns |

## Requirements

- Python 3.9+
- OpenTelemetry Collector (recommended for production)

## Contributing

We welcome contributions from the community. Please read our
[Contributing Guide](./CONTRIBUTING.md) before submitting a pull request.

This project requires [DCO sign-off](https://developercertificate.org/) on all
commits:

```bash
git commit -s -m "Your commit message"
```

Looking for a place to start? Check the
[good first issues](https://github.com/botanu-ai/botanu-sdk-python/labels/good%20first%20issue).

## Community

- [GitHub Discussions](https://github.com/botanu-ai/botanu-sdk-python/discussions) — questions, ideas, show & tell
- [GitHub Issues](https://github.com/botanu-ai/botanu-sdk-python/issues) — bug reports and feature requests

## Governance

See [GOVERNANCE.md](./GOVERNANCE.md) for details on roles, decision-making,
and the contributor ladder.

Current maintainers are listed in [MAINTAINERS.md](./MAINTAINERS.md).

## Security

To report a security vulnerability, please use
[GitHub Security Advisories](https://github.com/botanu-ai/botanu-sdk-python/security/advisories/new)
or see [SECURITY.md](./SECURITY.md) for full details. **Do not file a public issue.**


## Code of Conduct

This project follows the
[LF Projects Code of Conduct](https://lfprojects.org/policies/code-of-conduct/).
See [CODE_OF_CONDUCT.md](./CODE_OF_CONDUCT.md).

## License

[Apache License 2.0](./LICENSE)

