Skip to main content

reo-census (Python)

Send custom telemetry events to Reo’s ingestion API. Defaults to https://telemetry.reo.dev/data (same as the npm reo-census tracker).

Install

pip install reo-census

Usage

Each send uses a JSON body shaped like:

{
  "activity_type": "pypi_download",
  "package": "<your_package>",
  "version": "1.0.0"
}

Set your package name and version on the logger; optional extra keys can be passed to log_event (they are merged in and override defaults where keys overlap). All values are sent as strings.

from reo_census import ReoEventLogger

logger = ReoEventLogger(
    endpoint_url="https://telemetry.reo.dev/data",
    timeout=3.0,
    package_name="my-package",
    package_version="1.0.0",
)
# Default: non-blocking — HTTP runs in a background thread; returns True if queued.
ok = logger.log_event()

# Add or override fields:
ok = logger.log_event({"region": "us-east-1"})

# Wait for the HTTP round-trip (tests, debugging, or short-lived scripts):
ok = logger.log_event(blocking=True)
  • blocking=False (default): returns True if the event was queued, False if opted out, URL rejected, or payload too large. Does not reflect HTTP success.
  • blocking=True: returns True only after a successful HTTP 2xx (with retries), False on failure or opt-out.

Short-lived programs (one-shot CLI) should use blocking=True or the process may exit before the daemon thread finishes sending.

Opt-out

Respected when any of these apply:

  • PACKAGE_TRACKER_ANALYTICS=false
  • DO_NOT_TRACK is 1, true, or yes (case-insensitive)

Endpoint override

Set PACKAGE_TRACKER_ENDPOINT to override the URL (same as the Node tracker). Only http:// and https:// URLs with a host are accepted.

Verbose logging

Set PACKAGE_TRACKER_VERBOSE=true to print send details to stderr.

Metadata

Release files for reo-census 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for reo-census 0.2.0
File Size Uploaded
reo_census-0.2.0.tar.gz 15.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for reo-census 0.2.0
File Interpreter ABI Platform
reo_census-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 25.1 kB

Release files / reo_census-0.2.0.tar.gz

Download URL reo_census-0.2.0.tar.gz
Size 15.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c0eba35ef9ffb095b3c18f4775cdca4cc9221ad109c3646dd1e5c0bad25d534b
BLAKE2b-256 checksum
How to use checksums
7149a29366bdeea22834db74cec5864bf3f4ff8f0b2002a47e298a034df31c0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release files / reo_census-0.2.0-py3-none-any.whl

Download URL reo_census-0.2.0-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
616ec1b5bf448d7d7e0cf04dcbec5dec9c2eeeecc8190142c25ada72ff969e9f
BLAKE2b-256 checksum
How to use checksums
2e17196d4e260a3bacabe08f42cbbdb298ee9a9ad31a4515595eac1806d8c8d3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page