Python
When developers use your Python package, it signals real product usage. With Reo, you can identify and monitor usage of your PyPI packages.
How it works
A developer installs and runs your package
Your code calls
log_event()at the point you choseThe event is sent to your telemetry endpoint, a hostname on your own domain such as
packages.<your_domain>.comThat hostname points to Reo's telemetry endpoint through a CNAME record, so the event arrives at Reo
Reo processes it and surfaces it as a developer activity signal in your dashboard
Step 1: Send your PyPI package URL to Reo
Share your package link with the Reo team so we can configure tracking on our side:
https://pypi.org/project/your-packageStep 2: Create the product usage metric
From the left navigation menu, click on Settings > select Configurations

Spot the Product usage metrics card and click Configure

Click Create New

Name the metric
pypi_downloadChoose the Mode as Single

Additionally, you can also add meta parameters
Against the 'Meta parameters' for your metric click Add new > provide a name for the parameter and choose the Data type


Once you've configured the meta parameters and metric, click Save

Step 3: Point your telemetry domain at Reo
Telemetry is sent to a hostname on your own domain. Add a CNAME record pointing it at Reo's telemetry endpoint:
CNAME
packages.<your_domain>.com
telemetry.reo.dev
Step 4: Install the SDK
Step 5: Add it to your dependencies
Add reo-census to your package's dependency file (requirements.txt, pyproject.toml, or Pipfile) so it installs alongside your package.
Step 6: Initialise the logger
Point endpoint_url at the hostname you set up in Step 3, including the /data path:
Alternatively, set it at runtime with no code change:
Step 7: Call log_event() where usage happens
Put the call wherever it reflects real usage: application startup, CLI execution, package initialisation, or a meaningful product event.
Step 8: Verify
Run your package, then open your Reo dashboard and check the pypi_download metric. You should see:
The package name and version in use
Event timestamp and caller IP, recorded by Reo on arrival
Any custom properties you chose to send
Optional configuration
Sending directly to Reo instead of your own domain
If you skip Step 3, leave endpoint_url unset and the SDK falls back to Reo's endpoint:
Events are recorded the same way. You lose only the benefit of telemetry travelling under your own brand and domain.
Adjusting the timeout
timeout controls the per-request socket timeout in seconds, and defaults to 3.0. Keep it low so telemetry never holds up your users.
Defaults
endpoint_url
https://telemetry.reo.dev/data
timeout
3.0 seconds
Blocking mode
Non-blocking (the request runs in a background thread)
How your users opt out
Once you add log_event(), tracking is on by default. Your users can disable it by setting a single environment variable:
DO_NOT_TRACK
1, true, or yes (case-insensitive)
Disables all event sending
Last updated
Was this helpful?

