This project demostrates how Jitsu can be used to track anonymous usage events (aka Telemetry) for pip package. Basic os info (version, platform it's) is being sent through Jitsu.API. On backend the data is enriched with location (Country, City) and other usefull parameters.
Please note, that this repository is not a python package itself, but a demostration how Jitsu can work as a Telemetry backend. Just copy the code to enable telemetry collection in your package.
The code sends two types of events:
install
— when pip package is installed (via setup.py)module_init
— when module is initialized, see __init__.py
See the underlying code in telemetry.py
- telemetry.py is using Jitsu as a backend: Deploy Jitsu or signup for Jitsu.Cloud
- Create an API Key and a Destination (for Cloud.Jitsu users we offer free demo Postgres destination) in Jitsu UI.
- Put HTTP calls into
telemetry.py
This example allows to opt-out for tracking by setting TELEMETRY_DISABLED
to true
.
Jitsu is an open-source data collection platform.