Metadata-Version: 2.4
Name: ptelemetry
Version: 0.2.1
Summary: Python SDK for ProductTelemetry - privacy-first product analytics
Project-URL: Homepage, https://github.com/AInvirion/ptelemetry-python-sdk
Project-URL: Repository, https://github.com/AInvirion/ptelemetry-python-sdk
Project-URL: Documentation, https://github.com/AInvirion/ptelemetry-python-sdk/tree/main/docs
Author-email: AInvirion <support@ainvirion.com>
License-Expression: MIT
License-File: LICENSE
Keywords: analytics,cli,gdpr,metrics,privacy,sdk,telemetry
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
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: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Monitoring
Requires-Python: >=3.9
Requires-Dist: httpx>=0.24.0
Provides-Extra: dev
Requires-Dist: build>=0.10.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: respx>=0.20; extra == 'dev'
Description-Content-Type: text/markdown

# Product Telemetry SDK (Python)

Privacy-first product analytics and telemetry SDK

## Features

- **Privacy-first** - IP hashing, GDPR compliant
- **Event tracking** - Lifecycle, usage, and error events
- **User identification** - Link anonymous users to known IDs
- **GDPR deletion** - Self-service data deletion requests
- **Multiple opt-out mechanisms** - DO_NOT_TRACK, config file, env vars
- **Minimal dependencies** - Only httpx required
- **Thread-safe** - Use from multiple threads safely
- **Automatic batching** - Efficient event queueing and flushing

## Installation

```bash
pip install ptelemetry
```

## Quick Start

```python
from ptelemetry import Telemetry

t = Telemetry(write_key='proj_wk_xxxxx')

# Track events
t.track('feature.used', {'feature': 'export'})

# Track errors
try:
    risky_operation()
except Exception as e:
    t.error(exception=e)

# Link to user
t.identify('user_123')
```

## Documentation

- [Getting Started](docs/getting-started.md) - Installation, configuration, troubleshooting
- [API Reference](docs/api-reference.md) - Complete API documentation
- [Examples](docs/examples.md) - Real-world usage examples

## Links

- [ProductTelemetry Platform](https://github.com/AInvirion/Product-Telemetry)
- [JavaScript/TypeScript SDK](https://github.com/AInvirion/ptelemetry-npm-sdk)
- [PyPI Package](https://pypi.org/project/ptelemetry/)

## Contributing

We welcome contributions! Please read our [Contributing Guidelines](CONTRIBUTING.md) before submitting a pull request.

### Development Setup

```bash
# Install dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/ -v

# Build package
python -m build
```

## Security

If you discover a security vulnerability, please follow our [Security Policy](SECURITY.md).

## License

MIT - see [LICENSE](LICENSE) file for details.

Copyright (c) 2025-2026 AInvirion LLC. All Rights Reserved.
