About this project
Aptabase Python SDK is the official client library for Aptabase, an open-source, privacy-first analytics platform supporting mobile, desktop, and web applications.
Key characteristics:
- Fully async implementation built on `httpx` and `asyncio`
- Privacy-first design with no personal data collection
- Requires Python 3.11 or later
- Automatic event batching and periodic flushing
- Minimal dependency footprint
Usage pattern:
Initialize the client with your Aptabase app key (region-coded: `A-EU-*` for European servers, `A-US-*` for US servers), then track events with optional properties. Events are queued and flushed automatically, but can also be force-flushed manually. The SDK supports context manager usage for automatic lifecycle management, as well as explicit start/stop control.
Configuration options include app version, debug mode, maximum batch size (up to 25 events), flush interval, and HTTP timeout.
Error handling provides distinct exceptions for network issues (`NetworkError`) and general Aptabase errors (`AptabaseError`).
Development setup uses `uv sync --dev`, with tests via `pytest`, linting via `ruff`, and type checking via `mypy`.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.