Metadata-Version: 2.4
Name: parmot
Version: 0.1.0
Summary: Parmot client SDK with LLM usage tracking and provider wrappers.
Author-email: Emmett McFarlane <emmett@thepi.pe>
License-Expression: MIT
Project-URL: Homepage, https://parmot.com
Project-URL: Repository, https://github.com/emcf/parmot
Project-URL: Issues, https://github.com/emcf/parmot/issues
Keywords: llm,usage,tracking,sdk,openai,anthropic,cohere
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
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: Typing :: Typed
Requires-Python: >=3.9
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.31.0
Provides-Extra: openai
Requires-Dist: openai; extra == "openai"
Provides-Extra: anthropic
Requires-Dist: anthropic; extra == "anthropic"
Provides-Extra: cohere
Requires-Dist: cohere; extra == "cohere"
Provides-Extra: dev
Requires-Dist: mypy>=1.10.0; extra == "dev"
Requires-Dist: pytest>=7.4.0; extra == "dev"
Requires-Dist: build>=1.2.1; extra == "dev"
Requires-Dist: twine>=5.1.0; extra == "dev"
Requires-Dist: ruff>=0.5.0; extra == "dev"
Requires-Dist: openai; extra == "dev"
Requires-Dist: anthropic; extra == "dev"
Requires-Dist: cohere; extra == "dev"
Requires-Dist: black; extra == "dev"

# ![Parmot Logo](https://parmot-frontend.vercel.app/_next/image?url=%2Flogo.png&w=128&q=75)

**Parmot Python SDK**

Parmot is a lightweight package tracking and managing **end-user usage, limits, and plans** across AI providers (OpenAI, Anthropic, Cohere, etc.).

Visit [parmot.com](https://www.parmot.com/) for more.

---

## 🚀 Features

- Track **token usage and costs** across multiple providers.
- Enforce **rate limits** and **usage limits** for end-users.
- Manage **subscription plans** (create, update, delete, assign).
- Easy-to-use wrappers for OpenAI, Anthropic, and Cohere clients with automatic tracking.

---

## 📦 Installation

```bash
pip install parmot[openai]
```

To install Parmot for other provider clients, simply include them in the brackets:

```bash
pip install parmot[anthropic]
pip install parmot[cohere]
```

---

## ⚡ Quick Start

```python
from parmot import TrackedOpenAI

client = TrackedOpenAI(api_key="OPENAI_API_KEY", parmot_api_key="PARMOT_API_KEY")

response = client.chat.completions.create(
    model="gpt-4o-mini",
    user_id="end_user_123",
    messages=[{"role": "user", "content": "Tell me a joke."}],
)

print(response.choices[0].message)
```

---

## 📖 Docs

👉 [Full Documentation](https://www.parmot.com/docs)
