cmdrdata-gemini


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

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

**The standard for AI customer intelligence - track every Gemini 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-gemini` 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 Google GenAI 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 (Gemini 1.5 Flash, Gemini 1.5 Pro, 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

### 💎 Advanced Analytics with Custom Metadata

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

```python
# Example: AI-powered content generation with feature tracking
response = client.models.generate_content(
    model="gemini-1.5-pro",
    contents="Write a comprehensive guide about renewable energy...",
    customer_id="customer-123",
    # Custom metadata for analytics
    custom_metadata={
        "feature": "content_generation",
        "experiment_group": "gemini_pro_test",
        "content_type": "technical_guide",
        "user_segment": "enterprise",
        "session_id": "sess_xyz789"
    }
)

# Example: AI tutoring platform with learning analytics
response = client.models.generate_content(
    model="gemini-1.5-flash",
    contents=complex_physics_problem,
    customer_id="customer-456",
    custom_metadata={
        "use_case": "educational_tutoring",
        "subject": "physics",
        "interaction_count": 5,
        "learning_path": "advanced_physics",
        "engagement_score": "high"
    }
)

# Example: Multi-modal analysis with usage patterns
response = client.models.generate_content(
    model="gemini-1.5-pro-vision",
    contents=[image_data, "Analyze this image"],
    customer_id="customer-789",
    custom_metadata={
        "modality": "vision_text",
        "workflow": "image_analysis",
        "api_version": "v2",
        "client_platform": "web",
        "feature_flag": "vision_enabled"
    }
)
```

**Intelligence Use Cases:**
- **Feature adoption**: Track which AI features customers actually use
- **A/B testing**: Compare model performance across experiment groups
- **Learning analytics**: Understand educational engagement patterns
- **Multi-modal insights**: Analyze usage across different modalities
- **Platform optimization**: Identify performance bottlenecks by platform
- **Product development**: Data-driven feature prioritization

## 🛡️ Production Ready

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

- **Resilient Tracking:** Gemini 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-gemini
```

### Basic Usage

```python
# Before
from google import genai
client = genai.Client(api_key="your-gemini-key")

# After - same API, automatic tracking!
import cmdrdata_gemini
client = cmdrdata_gemini.TrackedGemini(
    api_key="your-gemini-key",
    cmdrdata_api_key="your-cmdrdata-key"
)

# Same API as regular Google Gen AI client
response = client.models.generate_content(
    model="gemini-1.5-flash",
    contents="Explain how AI works"
)

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

### Async Support

```python
import cmdrdata_gemini

async def main():
    client = cmdrdata_gemini.AsyncTrackedGemini(
        api_key="your-gemini-key",
        cmdrdata_api_key="your-cmdrdata-key"
    )

    response = await client.models.generate_content(
        model="gemini-1.5-flash",
        contents="Hello, Gemini!"
    )

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

## 🎯 Customer Context Management

### Automatic Customer Tracking

```python
from cmdrdata_gemini.context import customer_context

# Set customer context for automatic tracking
with customer_context("customer-123"):
    response = client.models.generate_content(
        model="gemini-1.5-flash",
        contents="Help me code"
    )
    # Automatically tracked for customer-123!

# Or pass customer_id directly
response = client.models.generate_content(
    model="gemini-1.5-flash",
    contents="Hello",
    customer_id="customer-456"  # Direct customer ID
)
```

### Manual Context Management

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

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

response = client.models.generate_content(...)  # Tracked for customer-789

# Clear context
clear_customer_context()
```

## ⚙️ Configuration

### Environment Variables

```bash
# Optional: Set via environment variables
export GEMINI_API_KEY="your-gemini-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_gemini.TrackedGemini()
```

### Custom Configuration

```python
client = cmdrdata_gemini.TrackedGemini(
    api_key="your-gemini-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": "gemini-1.5-flash",
    "input_tokens": 25,
    "output_tokens": 150,
    "total_tokens": 175,
    "provider": "google",
    "timestamp": "2025-01-15T10:30:00Z",
    "metadata": {
        "response_id": "resp_abc123",
        "model_version": "001",
        "finish_reason": "STOP",
        "safety_ratings": null
    }
}
```

**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

### Token Counting

```python
# Count tokens without generating content (also tracked)
token_count = client.models.count_tokens(
    model="gemini-1.5-flash",
    contents="How many tokens is this?"
)
print(f"Token count: {token_count.total_tokens}")
```

### Disable Tracking for Specific Calls

```python
# Disable tracking for sensitive operations
response = client.models.generate_content(
    model="gemini-1.5-flash",
    contents="Private query",
    track_usage=False  # This call won't be tracked
)
```

### Error Handling

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

try:
    client = cmdrdata_gemini.TrackedGemini(
        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 Google Gen AI exceptions work the same way
try:
    response = client.models.generate_content(...)
except Exception as e:  # Google Gen AI exceptions
    print(f"Google Gen AI error: {e}")
    # Your existing error handling works unchanged
```

## 🔧 Development

### Requirements

- Python 3.9+
- google-genai>=0.1.0

### Installation for Development

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

### Running Tests

```bash
# Run all tests
pytest

# Run with coverage
pytest --cov=cmdrdata_gemini

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

### Code Quality

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

# Type checking
mypy cmdrdata_gemini/

# 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/gemini](https://docs.cmdrdata.ai/gemini)
- **Issues**: [GitHub Issues](https://github.com/cmdrdata-ai/cmdrdata-gemini/issues)
- **Support**: [spot@cmdrdata.ai](mailto:spot@cmdrdata.ai)

## 🔗 Related Projects

- **[cmdrdata-openai](https://github.com/cmdrdata-ai/cmdrdata-openai)** - Usage tracking for OpenAI
- **[cmdrdata-anthropic](https://github.com/cmdrdata-ai/cmdrdata-anthropic)** - Usage tracking for Anthropic Claude
- **[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-gemini",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "ai, api-wrapper, customer-tracking, fine-grained-billing, gemini, genai, google, llm, metadata, usage-based-billing",
    "author": null,
    "author_email": "CMDR Data Team <team@cmdrdata.ai>",
    "download_url": "https://files.pythonhosted.org/packages/14/e4/103fab3691d75bc3bf7ff0e9b3ee8d8b3f9e3d59b5ce5b9dd2a611732085/cmdrdata_gemini-0.2.0.tar.gz",
    "platform": null,
    "description": "# cmdrdata-gemini\n\n[![CI](https://github.com/cmdrdata-ai/cmdrdata-gemini/workflows/CI/badge.svg)](https://github.com/cmdrdata-ai/cmdrdata-gemini/actions)\n[![codecov](https://codecov.io/gh/cmdrdata-ai/cmdrdata-gemini/branch/main/graph/badge.svg)](https://codecov.io/gh/cmdrdata-ai/cmdrdata-gemini)\n[![PyPI version](https://badge.fury.io/py/cmdrdata-gemini.svg)](https://badge.fury.io/py/cmdrdata-gemini)\n[![Python Support](https://img.shields.io/pypi/pyversions/cmdrdata-gemini.svg)](https://pypi.org/project/cmdrdata-gemini/)\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 Gemini 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-gemini` 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 Google GenAI 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 (Gemini 1.5 Flash, Gemini 1.5 Pro, 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\udc8e Advanced Analytics with Custom Metadata\n\nTrack arbitrary metadata with each API call to enable sophisticated analytics:\n\n```python\n# Example: AI-powered content generation with feature tracking\nresponse = client.models.generate_content(\n    model=\"gemini-1.5-pro\",\n    contents=\"Write a comprehensive guide about renewable energy...\",\n    customer_id=\"customer-123\",\n    # Custom metadata for analytics\n    custom_metadata={\n        \"feature\": \"content_generation\",\n        \"experiment_group\": \"gemini_pro_test\",\n        \"content_type\": \"technical_guide\",\n        \"user_segment\": \"enterprise\",\n        \"session_id\": \"sess_xyz789\"\n    }\n)\n\n# Example: AI tutoring platform with learning analytics\nresponse = client.models.generate_content(\n    model=\"gemini-1.5-flash\",\n    contents=complex_physics_problem,\n    customer_id=\"customer-456\",\n    custom_metadata={\n        \"use_case\": \"educational_tutoring\",\n        \"subject\": \"physics\",\n        \"interaction_count\": 5,\n        \"learning_path\": \"advanced_physics\",\n        \"engagement_score\": \"high\"\n    }\n)\n\n# Example: Multi-modal analysis with usage patterns\nresponse = client.models.generate_content(\n    model=\"gemini-1.5-pro-vision\",\n    contents=[image_data, \"Analyze this image\"],\n    customer_id=\"customer-789\",\n    custom_metadata={\n        \"modality\": \"vision_text\",\n        \"workflow\": \"image_analysis\",\n        \"api_version\": \"v2\",\n        \"client_platform\": \"web\",\n        \"feature_flag\": \"vision_enabled\"\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- **Learning analytics**: Understand educational engagement patterns\n- **Multi-modal insights**: Analyze usage across different modalities\n- **Platform optimization**: Identify performance bottlenecks by platform\n- **Product development**: Data-driven feature prioritization\n\n## \ud83d\udee1\ufe0f Production Ready\n\n**Extremely robust and reliable** - Built for production environments with:\n\n- **Resilient Tracking:** Gemini 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-gemini\n```\n\n### Basic Usage\n\n```python\n# Before\nfrom google import genai\nclient = genai.Client(api_key=\"your-gemini-key\")\n\n# After - same API, automatic tracking!\nimport cmdrdata_gemini\nclient = cmdrdata_gemini.TrackedGemini(\n    api_key=\"your-gemini-key\",\n    cmdrdata_api_key=\"your-cmdrdata-key\"\n)\n\n# Same API as regular Google Gen AI client\nresponse = client.models.generate_content(\n    model=\"gemini-1.5-flash\",\n    contents=\"Explain how AI works\"\n)\n\nprint(response.text)\n# Usage automatically tracked to cmdrdata backend!\n```\n\n### Async Support\n\n```python\nimport cmdrdata_gemini\n\nasync def main():\n    client = cmdrdata_gemini.AsyncTrackedGemini(\n        api_key=\"your-gemini-key\",\n        cmdrdata_api_key=\"your-cmdrdata-key\"\n    )\n\n    response = await client.models.generate_content(\n        model=\"gemini-1.5-flash\",\n        contents=\"Hello, Gemini!\"\n    )\n\n    print(response.text)\n    # Async usage tracking included!\n```\n\n## \ud83c\udfaf Customer Context Management\n\n### Automatic Customer Tracking\n\n```python\nfrom cmdrdata_gemini.context import customer_context\n\n# Set customer context for automatic tracking\nwith customer_context(\"customer-123\"):\n    response = client.models.generate_content(\n        model=\"gemini-1.5-flash\",\n        contents=\"Help me code\"\n    )\n    # Automatically tracked for customer-123!\n\n# Or pass customer_id directly\nresponse = client.models.generate_content(\n    model=\"gemini-1.5-flash\",\n    contents=\"Hello\",\n    customer_id=\"customer-456\"  # Direct customer ID\n)\n```\n\n### Manual Context Management\n\n```python\nfrom cmdrdata_gemini.context import set_customer_context, clear_customer_context\n\n# Set context for current thread\nset_customer_context(\"customer-789\")\n\nresponse = client.models.generate_content(...)  # Tracked for customer-789\n\n# Clear context\nclear_customer_context()\n```\n\n## \u2699\ufe0f Configuration\n\n### Environment Variables\n\n```bash\n# Optional: Set via environment variables\nexport GEMINI_API_KEY=\"your-gemini-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_gemini.TrackedGemini()\n```\n\n### Custom Configuration\n\n```python\nclient = cmdrdata_gemini.TrackedGemini(\n    api_key=\"your-gemini-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\": \"gemini-1.5-flash\",\n    \"input_tokens\": 25,\n    \"output_tokens\": 150,\n    \"total_tokens\": 175,\n    \"provider\": \"google\",\n    \"timestamp\": \"2025-01-15T10:30:00Z\",\n    \"metadata\": {\n        \"response_id\": \"resp_abc123\",\n        \"model_version\": \"001\",\n        \"finish_reason\": \"STOP\",\n        \"safety_ratings\": null\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### Token Counting\n\n```python\n# Count tokens without generating content (also tracked)\ntoken_count = client.models.count_tokens(\n    model=\"gemini-1.5-flash\",\n    contents=\"How many tokens is this?\"\n)\nprint(f\"Token count: {token_count.total_tokens}\")\n```\n\n### Disable Tracking for Specific Calls\n\n```python\n# Disable tracking for sensitive operations\nresponse = client.models.generate_content(\n    model=\"gemini-1.5-flash\",\n    contents=\"Private query\",\n    track_usage=False  # This call won't be tracked\n)\n```\n\n### Error Handling\n\n```python\nfrom cmdrdata_gemini.exceptions import CMDRDataError, TrackingError\n\ntry:\n    client = cmdrdata_gemini.TrackedGemini(\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 Google Gen AI exceptions work the same way\ntry:\n    response = client.models.generate_content(...)\nexcept Exception as e:  # Google Gen AI exceptions\n    print(f\"Google Gen AI error: {e}\")\n    # Your existing error handling works unchanged\n```\n\n## \ud83d\udd27 Development\n\n### Requirements\n\n- Python 3.9+\n- google-genai>=0.1.0\n\n### Installation for Development\n\n```bash\ngit clone https://github.com/cmdrdata-ai/cmdrdata-gemini.git\ncd cmdrdata-gemini\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_gemini\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_gemini/\nisort cmdrdata_gemini/\n\n# Type checking\nmypy cmdrdata_gemini/\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/gemini](https://docs.cmdrdata.ai/gemini)\n- **Issues**: [GitHub Issues](https://github.com/cmdrdata-ai/cmdrdata-gemini/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- **[cmdrdata-anthropic](https://github.com/cmdrdata-ai/cmdrdata-anthropic)** - Usage tracking for Anthropic Claude\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 Google Gemini with arbitrary metadata support",
    "version": "0.2.0",
    "project_urls": {
        "Bug Tracker": "https://github.com/cmdrdata-ai/cmdrdata-gemini/issues",
        "Documentation": "https://docs.cmdrdata.ai/gemini",
        "Homepage": "https://github.com/cmdrdata-ai/cmdrdata-gemini",
        "Repository": "https://github.com/cmdrdata-ai/cmdrdata-gemini"
    },
    "split_keywords": [
        "ai",
        " api-wrapper",
        " customer-tracking",
        " fine-grained-billing",
        " gemini",
        " genai",
        " google",
        " llm",
        " metadata",
        " usage-based-billing"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7663b3c908f73bddc209eb070f3e64f8374a5e93a520e8f1c686c9776c183e29",
                "md5": "15f78f36bd63d62c71839702ddad42ef",
                "sha256": "d6bfa907f0b7ce598dc9c923782183233ada20b929247ccfa750951238f9c2ba"
            },
            "downloads": -1,
            "filename": "cmdrdata_gemini-0.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "15f78f36bd63d62c71839702ddad42ef",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 39223,
            "upload_time": "2025-08-09T10:54:43",
            "upload_time_iso_8601": "2025-08-09T10:54:43.216102Z",
            "url": "https://files.pythonhosted.org/packages/76/63/b3c908f73bddc209eb070f3e64f8374a5e93a520e8f1c686c9776c183e29/cmdrdata_gemini-0.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "14e4103fab3691d75bc3bf7ff0e9b3ee8d8b3f9e3d59b5ce5b9dd2a611732085",
                "md5": "e5d7d2ce1d1582184ed7d760283b7321",
                "sha256": "f4c3d102e4a221dc55de68f99e171d56d1c7efe71c4e484a891670c10c04271a"
            },
            "downloads": -1,
            "filename": "cmdrdata_gemini-0.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e5d7d2ce1d1582184ed7d760283b7321",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 161164,
            "upload_time": "2025-08-09T10:54:45",
            "upload_time_iso_8601": "2025-08-09T10:54:45.011430Z",
            "url": "https://files.pythonhosted.org/packages/14/e4/103fab3691d75bc3bf7ff0e9b3ee8d8b3f9e3d59b5ce5b9dd2a611732085/cmdrdata_gemini-0.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-09 10:54:45",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cmdrdata-ai",
    "github_project": "cmdrdata-gemini",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cmdrdata-gemini"
}
        
Elapsed time: 1.55947s