cmdrdata-anthropic


Namecmdrdata-anthropic JSON
Version 0.2.0 PyPI version JSON
download
home_pageNone
SummaryCustomer tracking and usage-based billing for Anthropic Claude with arbitrary metadata support
upload_time2025-08-09 10:25:42
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT
keywords ai anthropic api-wrapper claude customer-tracking fine-grained-billing llm metadata usage-based-billing
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # cmdrdata-anthropic

[![CI](https://github.com/cmdrdata-ai/cmdrdata-anthropic/workflows/CI/badge.svg)](https://github.com/cmdrdata-ai/cmdrdata-anthropic/actions)
[![codecov](https://codecov.io/gh/cmdrdata-ai/cmdrdata-anthropic/branch/main/graph/badge.svg)](https://codecov.io/gh/cmdrdata-ai/cmdrdata-anthropic)
[![PyPI version](https://badge.fury.io/py/cmdrdata-anthropic.svg)](https://badge.fury.io/py/cmdrdata-anthropic)
[![Python Support](https://img.shields.io/pypi/pyversions/cmdrdata-anthropic.svg)](https://pypi.org/project/cmdrdata-anthropic/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

**The standard for AI customer intelligence - track every Claude call by customer, feature, or any dimension**

Join hundreds of companies making customer-level AI tracking the default. One line of code to add complete visibility into your AI operations. Free during beta.

## 📊 Complete AI Intelligence Layer

`cmdrdata-anthropic` is the missing analytics layer for your AI-powered application:

### **Track Everything That Matters**
- **Customer Intelligence** - Know exactly which customers use what features
- **Metadata Everything** - Tag usage by feature, experiment, team, region, or any dimension
- **Usage Patterns** - Understand how your AI is actually being used
- **Real-time Analytics** - Instant visibility into your AI operations

### **Built for Modern AI Apps**
- **One-line integration** - Drop-in replacement for Anthropic SDK
- **Zero latency overhead** - Async tracking never blocks your API calls  
- **Unlimited custom fields** - Track any metadata that matters to your business
- **Privacy first** - Your data never touches our servers (optional self-hosting)

### **What You Can Track**
- **Token usage** by customer, feature, experiment, or any dimension
- **Model usage** patterns (Claude 3.5 Sonnet, Claude 3 Haiku, etc.)
- **Customer behavior** - Who uses what, when, and how much
- **Custom metadata** - Unlimited fields for your specific needs
- **Performance metrics** - Latency, errors, success rates by segment

## 🛡️ Production Ready

**Extremely robust and reliable** - Built for production environments with:

- **Resilient Tracking:** Claude calls succeed even if tracking fails.
- **Non-blocking I/O:** Fire-and-forget tracking never slows down your application.
- **Automatic Retries:** Failed tracking attempts are automatically retried with exponential backoff.
- **Thread-Safe Context:** Safely track usage across multi-threaded and async applications.
- **Enterprise Security:** API key sanitization and input validation.

## 🚀 Quick Start

### Installation

```bash
pip install cmdrdata-anthropic
```

### Basic Usage

```python
# Before
import anthropic
client = anthropic.Anthropic(api_key="your-anthropic-key")

# After - same API, automatic tracking!
import cmdrdata_anthropic
client = cmdrdata_anthropic.TrackedAnthropic(
    api_key="your-anthropic-key",
    cmdrdata_api_key="your-cmdrdata-key"
)

# Same API as regular Anthropic client
response = client.messages.create(
    model="claude-3-5-sonnet-20241022",
    max_tokens=1000,
    messages=[{"role": "user", "content": "Hello, Claude!"}]
)

print(response.content)
# Usage automatically tracked to cmdrdata backend!
```

### Async Support

```python
import cmdrdata_anthropic

async def main():
    client = cmdrdata_anthropic.AsyncTrackedAnthropic(
        api_key="your-anthropic-key",
        cmdrdata_api_key="your-cmdrdata-key"
    )

    response = await client.messages.create(
        model="claude-3-5-sonnet-20241022",
        max_tokens=1000,
        messages=[{"role": "user", "content": "Hello!"}]
    )

    print(response.content)
    # Async usage tracking included!
```

## 🎯 Customer Context Management

### Automatic Customer Tracking

```python
from cmdrdata_anthropic.context import customer_context

# Set customer context for automatic tracking
with customer_context("customer-123"):
    response = client.messages.create(
        model="claude-3-5-sonnet-20241022",
        max_tokens=1000,
        messages=[{"role": "user", "content": "Help me code"}]
    )
    # Automatically tracked for customer-123!

# Or pass customer_id directly
response = client.messages.create(
    model="claude-3-5-sonnet-20241022",
    max_tokens=1000,
    messages=[{"role": "user", "content": "Hello"}],
    customer_id="customer-456"  # Direct customer ID
)
```

### Manual Context Management

```python
from cmdrdata_anthropic.context import set_customer_context, clear_customer_context

# Set context for current thread
set_customer_context("customer-789")

response = client.messages.create(...)  # Tracked for customer-789

# Clear context
clear_customer_context()
```

### 💎 Advanced Analytics with Custom Metadata

Track arbitrary metadata with each API call to enable sophisticated analytics:

```python
# Example: AI writing assistant with feature tracking
response = client.messages.create(
    model="claude-3-5-sonnet-20241022",
    max_tokens=2000,
    messages=[{"role": "user", "content": "Write a blog post about AI..."}],
    customer_id="customer-123",
    # Custom metadata for analytics
    custom_metadata={
        "feature": "content_generation",
        "experiment_group": "claude_3_5_test",
        "content_type": "blog_post",
        "user_segment": "power_user",
        "session_id": "sess_abc123"
    }
)

# Example: Customer support automation with behavior tracking
response = client.messages.create(
    model="claude-3-haiku-20240307",
    max_tokens=1000,
    messages=complex_support_conversation,
    customer_id="customer-456",
    custom_metadata={
        "use_case": "customer_support",
        "conversation_length": len(complex_support_conversation),
        "department": "technical_support",
        "interaction_type": "chat",
        "user_journey_stage": "resolution"
    }
)
```

**Intelligence Use Cases:**
- **Feature adoption**: Track which AI features customers actually use
- **A/B testing**: Compare model performance across experiment groups
- **User segmentation**: Understand usage patterns by customer segment
- **Journey analytics**: Track AI interactions throughout the customer journey
- **Performance optimization**: Identify which use cases need optimization
- **Product insights**: Data-driven decisions on feature development

## ⚙️ Configuration

### Environment Variables

```bash
# Optional: Set via environment variables
export ANTHROPIC_API_KEY="your-anthropic-key"
export CMDRDATA_API_KEY="your-cmdrdata-key"
export CMDRDATA_ENDPOINT="https://api.cmdrdata.ai/api/events"  # Optional
```

```python
# Then use without passing keys
client = cmdrdata_anthropic.TrackedAnthropic()
```

### Custom Configuration

```python
client = cmdrdata_anthropic.TrackedAnthropic(
    api_key="your-anthropic-key",
    cmdrdata_api_key="your-cmdrdata-key",
    cmdrdata_endpoint="https://your-custom-endpoint.com/api/events",
    track_usage=True,  # Enable/disable tracking
    timeout=30,  # Custom timeout
    max_retries=3  # Custom retry logic
)
```

## 🔒 Security & Privacy

### Automatic Data Sanitization

- **API keys automatically redacted** from logs
- **Sensitive data sanitized** before transmission
- **Input validation** prevents injection attacks
- **Secure defaults** for all configuration

### What Gets Tracked

```python
# Tracked data (anonymized):
{
    "customer_id": "customer-123",
    "model": "claude-sonnet-4-20250514",
    "input_tokens": 25,
    "output_tokens": 150,
    "total_tokens": 175,
    "provider": "anthropic",
    "timestamp": "2025-01-15T10:30:00Z",
    "metadata": {
        "response_id": "msg_abc123",
        "type": "message",
        "stop_reason": "end_turn"
    }
}
```

**Note**: Message content is never tracked - only metadata and token counts.

## 📊 Monitoring & Performance

### Built-in Performance Monitoring

```python
# Get performance statistics
stats = client.get_performance_stats()
print(f"Average response time: {stats['api_calls']['avg']}ms")
print(f"Total API calls: {stats['api_calls']['count']}")
```

### Health Monitoring

```python
# Check tracking system health
tracker = client.get_usage_tracker()
health = tracker.get_health_status()
print(f"Tracking healthy: {health['healthy']}")
```

## 🛠️ Advanced Usage

### Disable Tracking for Specific Calls

```python
# Disable tracking for sensitive operations
response = client.messages.create(
    model="claude-3-5-sonnet-20241022",
    max_tokens=1000,
    messages=[{"role": "user", "content": "Private query"}],
    track_usage=False  # This call won't be tracked
)
```

### Error Handling

```python
from cmdrdata_anthropic.exceptions import CMDRDataError, TrackingError

try:
    client = cmdrdata_anthropic.TrackedAnthropic(
        api_key="invalid-key",
        cmdrdata_api_key="invalid-cmdrdata-key"
    )
except CMDRDataError as e:
    print(f"Configuration error: {e}")
    # Handle configuration issues
```

### Integration with Existing Error Handling

```python
# All original Anthropic exceptions work the same way
try:
    response = client.messages.create(...)
except anthropic.APIError as e:
    print(f"Anthropic API error: {e}")
    # Your existing error handling works unchanged
```

## 🔧 Development

### Requirements

- Python 3.9+
- anthropic>=0.21.0

### Installation for Development

```bash
git clone https://github.com/cmdrdata-ai/cmdrdata-anthropic.git
cd cmdrdata-anthropic
pip install -e .[dev]
```

### Running Tests

```bash
# Run all tests
pytest

# Run with coverage
pytest --cov=cmdrdata_anthropic

# Run specific test categories
pytest -m unit          # Unit tests only
pytest -m integration   # Integration tests only
```

### Code Quality

```bash
# Format code
black cmdrdata_anthropic/
isort cmdrdata_anthropic/

# Type checking
mypy cmdrdata_anthropic/

# Security scanning
safety check
```

## 🤝 Contributing

We welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.

### Development Workflow

1. Fork the repository
2. Create a feature branch (`git checkout -b feature/amazing-feature`)
3. Make your changes
4. Add tests for your changes
5. Ensure all tests pass (`pytest`)
6. Format your code (`black . && isort .`)
7. Commit your changes (`git commit -m 'Add amazing feature'`)
8. Push to the branch (`git push origin feature/amazing-feature`)
9. Open a Pull Request

## 📜 License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## 🆘 Support

- **Documentation**: [https://docs.cmdrdata.ai/anthropic](https://docs.cmdrdata.ai/anthropic)
- **Issues**: [GitHub Issues](https://github.com/cmdrdata-ai/cmdrdata-anthropic/issues)
- **Support**: [spot@cmdrdata.ai](mailto:spot@cmdrdata.ai)

## 🔗 Related Projects

- **[cmdrdata-openai](https://github.com/cmdrdata-ai/cmdrdata-openai)** - Usage tracking for OpenAI
- **[CMDR Data Platform](https://www.cmdrdata.ai)** - Complete LLM usage analytics

## 📈 Changelog

See [CHANGELOG.md](CHANGELOG.md) for a complete list of changes and version history.

---

**Built with ❤️ by the CMDR Data team**

*Become the Google Analytics of your AI - understand everything, optimize everything.*

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "cmdrdata-anthropic",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "ai, anthropic, api-wrapper, claude, customer-tracking, fine-grained-billing, llm, metadata, usage-based-billing",
    "author": null,
    "author_email": "CMDR Data Team <team@cmdrdata.ai>",
    "download_url": "https://files.pythonhosted.org/packages/aa/11/af4eb531ea606bca54655d8f836968b6abca09a68f301145892375824f94/cmdrdata_anthropic-0.2.0.tar.gz",
    "platform": null,
    "description": "# cmdrdata-anthropic\n\n[![CI](https://github.com/cmdrdata-ai/cmdrdata-anthropic/workflows/CI/badge.svg)](https://github.com/cmdrdata-ai/cmdrdata-anthropic/actions)\n[![codecov](https://codecov.io/gh/cmdrdata-ai/cmdrdata-anthropic/branch/main/graph/badge.svg)](https://codecov.io/gh/cmdrdata-ai/cmdrdata-anthropic)\n[![PyPI version](https://badge.fury.io/py/cmdrdata-anthropic.svg)](https://badge.fury.io/py/cmdrdata-anthropic)\n[![Python Support](https://img.shields.io/pypi/pyversions/cmdrdata-anthropic.svg)](https://pypi.org/project/cmdrdata-anthropic/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n**The standard for AI customer intelligence - track every Claude call by customer, feature, or any dimension**\n\nJoin hundreds of companies making customer-level AI tracking the default. One line of code to add complete visibility into your AI operations. Free during beta.\n\n## \ud83d\udcca Complete AI Intelligence Layer\n\n`cmdrdata-anthropic` is the missing analytics layer for your AI-powered application:\n\n### **Track Everything That Matters**\n- **Customer Intelligence** - Know exactly which customers use what features\n- **Metadata Everything** - Tag usage by feature, experiment, team, region, or any dimension\n- **Usage Patterns** - Understand how your AI is actually being used\n- **Real-time Analytics** - Instant visibility into your AI operations\n\n### **Built for Modern AI Apps**\n- **One-line integration** - Drop-in replacement for Anthropic SDK\n- **Zero latency overhead** - Async tracking never blocks your API calls  \n- **Unlimited custom fields** - Track any metadata that matters to your business\n- **Privacy first** - Your data never touches our servers (optional self-hosting)\n\n### **What You Can Track**\n- **Token usage** by customer, feature, experiment, or any dimension\n- **Model usage** patterns (Claude 3.5 Sonnet, Claude 3 Haiku, etc.)\n- **Customer behavior** - Who uses what, when, and how much\n- **Custom metadata** - Unlimited fields for your specific needs\n- **Performance metrics** - Latency, errors, success rates by segment\n\n## \ud83d\udee1\ufe0f Production Ready\n\n**Extremely robust and reliable** - Built for production environments with:\n\n- **Resilient Tracking:** Claude calls succeed even if tracking fails.\n- **Non-blocking I/O:** Fire-and-forget tracking never slows down your application.\n- **Automatic Retries:** Failed tracking attempts are automatically retried with exponential backoff.\n- **Thread-Safe Context:** Safely track usage across multi-threaded and async applications.\n- **Enterprise Security:** API key sanitization and input validation.\n\n## \ud83d\ude80 Quick Start\n\n### Installation\n\n```bash\npip install cmdrdata-anthropic\n```\n\n### Basic Usage\n\n```python\n# Before\nimport anthropic\nclient = anthropic.Anthropic(api_key=\"your-anthropic-key\")\n\n# After - same API, automatic tracking!\nimport cmdrdata_anthropic\nclient = cmdrdata_anthropic.TrackedAnthropic(\n    api_key=\"your-anthropic-key\",\n    cmdrdata_api_key=\"your-cmdrdata-key\"\n)\n\n# Same API as regular Anthropic client\nresponse = client.messages.create(\n    model=\"claude-3-5-sonnet-20241022\",\n    max_tokens=1000,\n    messages=[{\"role\": \"user\", \"content\": \"Hello, Claude!\"}]\n)\n\nprint(response.content)\n# Usage automatically tracked to cmdrdata backend!\n```\n\n### Async Support\n\n```python\nimport cmdrdata_anthropic\n\nasync def main():\n    client = cmdrdata_anthropic.AsyncTrackedAnthropic(\n        api_key=\"your-anthropic-key\",\n        cmdrdata_api_key=\"your-cmdrdata-key\"\n    )\n\n    response = await client.messages.create(\n        model=\"claude-3-5-sonnet-20241022\",\n        max_tokens=1000,\n        messages=[{\"role\": \"user\", \"content\": \"Hello!\"}]\n    )\n\n    print(response.content)\n    # Async usage tracking included!\n```\n\n## \ud83c\udfaf Customer Context Management\n\n### Automatic Customer Tracking\n\n```python\nfrom cmdrdata_anthropic.context import customer_context\n\n# Set customer context for automatic tracking\nwith customer_context(\"customer-123\"):\n    response = client.messages.create(\n        model=\"claude-3-5-sonnet-20241022\",\n        max_tokens=1000,\n        messages=[{\"role\": \"user\", \"content\": \"Help me code\"}]\n    )\n    # Automatically tracked for customer-123!\n\n# Or pass customer_id directly\nresponse = client.messages.create(\n    model=\"claude-3-5-sonnet-20241022\",\n    max_tokens=1000,\n    messages=[{\"role\": \"user\", \"content\": \"Hello\"}],\n    customer_id=\"customer-456\"  # Direct customer ID\n)\n```\n\n### Manual Context Management\n\n```python\nfrom cmdrdata_anthropic.context import set_customer_context, clear_customer_context\n\n# Set context for current thread\nset_customer_context(\"customer-789\")\n\nresponse = client.messages.create(...)  # Tracked for customer-789\n\n# Clear context\nclear_customer_context()\n```\n\n### \ud83d\udc8e Advanced Analytics with Custom Metadata\n\nTrack arbitrary metadata with each API call to enable sophisticated analytics:\n\n```python\n# Example: AI writing assistant with feature tracking\nresponse = client.messages.create(\n    model=\"claude-3-5-sonnet-20241022\",\n    max_tokens=2000,\n    messages=[{\"role\": \"user\", \"content\": \"Write a blog post about AI...\"}],\n    customer_id=\"customer-123\",\n    # Custom metadata for analytics\n    custom_metadata={\n        \"feature\": \"content_generation\",\n        \"experiment_group\": \"claude_3_5_test\",\n        \"content_type\": \"blog_post\",\n        \"user_segment\": \"power_user\",\n        \"session_id\": \"sess_abc123\"\n    }\n)\n\n# Example: Customer support automation with behavior tracking\nresponse = client.messages.create(\n    model=\"claude-3-haiku-20240307\",\n    max_tokens=1000,\n    messages=complex_support_conversation,\n    customer_id=\"customer-456\",\n    custom_metadata={\n        \"use_case\": \"customer_support\",\n        \"conversation_length\": len(complex_support_conversation),\n        \"department\": \"technical_support\",\n        \"interaction_type\": \"chat\",\n        \"user_journey_stage\": \"resolution\"\n    }\n)\n```\n\n**Intelligence Use Cases:**\n- **Feature adoption**: Track which AI features customers actually use\n- **A/B testing**: Compare model performance across experiment groups\n- **User segmentation**: Understand usage patterns by customer segment\n- **Journey analytics**: Track AI interactions throughout the customer journey\n- **Performance optimization**: Identify which use cases need optimization\n- **Product insights**: Data-driven decisions on feature development\n\n## \u2699\ufe0f Configuration\n\n### Environment Variables\n\n```bash\n# Optional: Set via environment variables\nexport ANTHROPIC_API_KEY=\"your-anthropic-key\"\nexport CMDRDATA_API_KEY=\"your-cmdrdata-key\"\nexport CMDRDATA_ENDPOINT=\"https://api.cmdrdata.ai/api/events\"  # Optional\n```\n\n```python\n# Then use without passing keys\nclient = cmdrdata_anthropic.TrackedAnthropic()\n```\n\n### Custom Configuration\n\n```python\nclient = cmdrdata_anthropic.TrackedAnthropic(\n    api_key=\"your-anthropic-key\",\n    cmdrdata_api_key=\"your-cmdrdata-key\",\n    cmdrdata_endpoint=\"https://your-custom-endpoint.com/api/events\",\n    track_usage=True,  # Enable/disable tracking\n    timeout=30,  # Custom timeout\n    max_retries=3  # Custom retry logic\n)\n```\n\n## \ud83d\udd12 Security & Privacy\n\n### Automatic Data Sanitization\n\n- **API keys automatically redacted** from logs\n- **Sensitive data sanitized** before transmission\n- **Input validation** prevents injection attacks\n- **Secure defaults** for all configuration\n\n### What Gets Tracked\n\n```python\n# Tracked data (anonymized):\n{\n    \"customer_id\": \"customer-123\",\n    \"model\": \"claude-sonnet-4-20250514\",\n    \"input_tokens\": 25,\n    \"output_tokens\": 150,\n    \"total_tokens\": 175,\n    \"provider\": \"anthropic\",\n    \"timestamp\": \"2025-01-15T10:30:00Z\",\n    \"metadata\": {\n        \"response_id\": \"msg_abc123\",\n        \"type\": \"message\",\n        \"stop_reason\": \"end_turn\"\n    }\n}\n```\n\n**Note**: Message content is never tracked - only metadata and token counts.\n\n## \ud83d\udcca Monitoring & Performance\n\n### Built-in Performance Monitoring\n\n```python\n# Get performance statistics\nstats = client.get_performance_stats()\nprint(f\"Average response time: {stats['api_calls']['avg']}ms\")\nprint(f\"Total API calls: {stats['api_calls']['count']}\")\n```\n\n### Health Monitoring\n\n```python\n# Check tracking system health\ntracker = client.get_usage_tracker()\nhealth = tracker.get_health_status()\nprint(f\"Tracking healthy: {health['healthy']}\")\n```\n\n## \ud83d\udee0\ufe0f Advanced Usage\n\n### Disable Tracking for Specific Calls\n\n```python\n# Disable tracking for sensitive operations\nresponse = client.messages.create(\n    model=\"claude-3-5-sonnet-20241022\",\n    max_tokens=1000,\n    messages=[{\"role\": \"user\", \"content\": \"Private query\"}],\n    track_usage=False  # This call won't be tracked\n)\n```\n\n### Error Handling\n\n```python\nfrom cmdrdata_anthropic.exceptions import CMDRDataError, TrackingError\n\ntry:\n    client = cmdrdata_anthropic.TrackedAnthropic(\n        api_key=\"invalid-key\",\n        cmdrdata_api_key=\"invalid-cmdrdata-key\"\n    )\nexcept CMDRDataError as e:\n    print(f\"Configuration error: {e}\")\n    # Handle configuration issues\n```\n\n### Integration with Existing Error Handling\n\n```python\n# All original Anthropic exceptions work the same way\ntry:\n    response = client.messages.create(...)\nexcept anthropic.APIError as e:\n    print(f\"Anthropic API error: {e}\")\n    # Your existing error handling works unchanged\n```\n\n## \ud83d\udd27 Development\n\n### Requirements\n\n- Python 3.9+\n- anthropic>=0.21.0\n\n### Installation for Development\n\n```bash\ngit clone https://github.com/cmdrdata-ai/cmdrdata-anthropic.git\ncd cmdrdata-anthropic\npip install -e .[dev]\n```\n\n### Running Tests\n\n```bash\n# Run all tests\npytest\n\n# Run with coverage\npytest --cov=cmdrdata_anthropic\n\n# Run specific test categories\npytest -m unit          # Unit tests only\npytest -m integration   # Integration tests only\n```\n\n### Code Quality\n\n```bash\n# Format code\nblack cmdrdata_anthropic/\nisort cmdrdata_anthropic/\n\n# Type checking\nmypy cmdrdata_anthropic/\n\n# Security scanning\nsafety check\n```\n\n## \ud83e\udd1d Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for details.\n\n### Development Workflow\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Make your changes\n4. Add tests for your changes\n5. Ensure all tests pass (`pytest`)\n6. Format your code (`black . && isort .`)\n7. Commit your changes (`git commit -m 'Add amazing feature'`)\n8. Push to the branch (`git push origin feature/amazing-feature`)\n9. Open a Pull Request\n\n## \ud83d\udcdc License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## \ud83c\udd98 Support\n\n- **Documentation**: [https://docs.cmdrdata.ai/anthropic](https://docs.cmdrdata.ai/anthropic)\n- **Issues**: [GitHub Issues](https://github.com/cmdrdata-ai/cmdrdata-anthropic/issues)\n- **Support**: [spot@cmdrdata.ai](mailto:spot@cmdrdata.ai)\n\n## \ud83d\udd17 Related Projects\n\n- **[cmdrdata-openai](https://github.com/cmdrdata-ai/cmdrdata-openai)** - Usage tracking for OpenAI\n- **[CMDR Data Platform](https://www.cmdrdata.ai)** - Complete LLM usage analytics\n\n## \ud83d\udcc8 Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md) for a complete list of changes and version history.\n\n---\n\n**Built with \u2764\ufe0f by the CMDR Data team**\n\n*Become the Google Analytics of your AI - understand everything, optimize everything.*\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Customer tracking and usage-based billing for Anthropic Claude with arbitrary metadata support",
    "version": "0.2.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/cmdrdata-ai/cmdrdata-anthropic/issues",
        "Documentation": "https://docs.cmdrdata.ai/anthropic",
        "Homepage": "https://github.com/cmdrdata-ai/cmdrdata-anthropic",
        "Repository": "https://github.com/cmdrdata-ai/cmdrdata-anthropic"
    },
    "split_keywords": [
        "ai",
        " anthropic",
        " api-wrapper",
        " claude",
        " customer-tracking",
        " fine-grained-billing",
        " llm",
        " metadata",
        " usage-based-billing"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "36b68c60f96c540ba354d760adcc9386524eb2051777272ddb6cf3ea35278490",
                "md5": "78c1e955c4b3e7c2d67ba5d27d21f0ac",
                "sha256": "3b33fa258a7671d397b6683acd1a9bcd05906cd0e56092766a16ca47d6ae8f0a"
            },
            "downloads": -1,
            "filename": "cmdrdata_anthropic-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "78c1e955c4b3e7c2d67ba5d27d21f0ac",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 38768,
            "upload_time": "2025-08-09T10:25:40",
            "upload_time_iso_8601": "2025-08-09T10:25:40.790689Z",
            "url": "https://files.pythonhosted.org/packages/36/b6/8c60f96c540ba354d760adcc9386524eb2051777272ddb6cf3ea35278490/cmdrdata_anthropic-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "aa11af4eb531ea606bca54655d8f836968b6abca09a68f301145892375824f94",
                "md5": "4f6d578899f09e385898126f606f5ba8",
                "sha256": "e504453f1512addafd49dc1518078ceb6197d85d10bdc044d967fd1ee034c53f"
            },
            "downloads": -1,
            "filename": "cmdrdata_anthropic-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "4f6d578899f09e385898126f606f5ba8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 168597,
            "upload_time": "2025-08-09T10:25:42",
            "upload_time_iso_8601": "2025-08-09T10:25:42.638695Z",
            "url": "https://files.pythonhosted.org/packages/aa/11/af4eb531ea606bca54655d8f836968b6abca09a68f301145892375824f94/cmdrdata_anthropic-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-09 10:25:42",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cmdrdata-ai",
    "github_project": "cmdrdata-anthropic",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cmdrdata-anthropic"
}
        
Elapsed time: 1.16202s