Metadata-Version: 2.4
Name: teer
Version: 0.0.5
Summary: Teer Python SDK
Project-URL: Documentation, https://github.com/Shane Rogers/teer-python#readme
Project-URL: Issues, https://github.com/Shane Rogers/teer-python/issues
Project-URL: Source, https://github.com/Shane Rogers/teer-python
Author-email: Shane Rogers <shane@teer.ai>
License-Expression: MIT
License-File: LICENSE.txt
Keywords: analytics,llm,tracking
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.8
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 :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Typing :: Typed
Requires-Python: >=3.8
Requires-Dist: requests>=2.25.0
Description-Content-Type: text/markdown

# Teer Python SDK

[![PyPI - Version](https://img.shields.io/pypi/v/teer.svg)](https://pypi.org/project/teer)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/teer.svg)](https://pypi.org/project/teer)

The official Python SDK for [Teer](https://teer.ai), a platform for tracking and analyzing LLM usage.

## Table of Contents

- [Installation](#installation)
- [Usage](#usage)
- [Examples](#examples)
- [License](#license)

## Installation

```console
pip install teer
```

## Usage

```python
from teer import TeerClient

# Initialize with your API key
client = TeerClient("YOUR_API_KEY")

# Or initialize with a custom base URL (e.g., for development or enterprise deployments)
client = TeerClient(
    api_key="YOUR_API_KEY",
    base_url="https://dev-track.teer.ai"
)

# Send usage data
client.ingest.send({
    "provider": "anthropic",
    "model": "claude-3-haiku-20240307",
    "function_id": "my-function",
    "usage": {
        "input": 1000,
        "output": 2000
    }
})
```

## Examples

Check out the [examples](./examples) directory for more usage examples:

- [Basic Usage](./examples/basic_usage.py): Simple example of using the Teer client
- [Custom Base URL](./examples/custom_base_url.py): Example of initializing the Teer client with a custom base URL
- [Usage Payload Example](./examples/usage_payload_example.py): Example of creating a payload for the Teer ingest API

## License

`teer` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
