Skip to content

AInvirion/ptelemetry-python-sdk

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

pip install ptelemetry

Quick Start

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

Links

Contributing

We welcome contributions! Please read our Contributing Guidelines before submitting a pull request.

Development Setup

# 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.

License

MIT - see LICENSE file for details.

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