Custom telemetry client for Reo (POST JSON to telemetry.reo.dev)
Project description
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
from reo_census import ReoEventLogger
logger = ReoEventLogger(
endpoint_url="https://telemetry.reo.dev/data",
timeout=3.0,
)
# Default: non-blocking — HTTP runs in a background thread; returns True if queued.
ok = logger.log_event({"event": "my_event", "package": "demo", "version": "1.0.0"})
# Wait for the HTTP round-trip (tests, debugging, or short-lived scripts):
ok = logger.log_event({"event": "my_event"}, blocking=True)
Event property values are sent as strings.
blocking=False(default): returnsTrueif the event was queued,Falseif opted out, URL rejected, or payload too large. Does not reflect HTTP success.blocking=True: returnsTrueonly after a successful HTTP 2xx (with retries),Falseon 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=falseDO_NOT_TRACKis1,true, oryes(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.
Security notes
- TLS: Use
https://endpoints in production. The default is HTTPS to telemetry.reo.dev. - Endpoint control:
endpoint_urlandPACKAGE_TRACKER_ENDPOINTshould only be set by operators or trusted config. Arbitrary schemes (file:, etc.) are rejected. - Payload size: JSON bodies larger than 256 KiB are not sent (guardrail against accidental huge posts).
- Secrets: Do not put API keys or tokens in
log_eventproperties; verbose mode logs the body to stderr when enabled.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file reo_census-0.1.0.tar.gz.
File metadata
- Download URL: reo_census-0.1.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b8dae6f551c962d0ebe3460fcffadce3e2b57fe4aa0ab5d904b86c54609c9bb
|
|
| MD5 |
a77649c5f2af92222475ea8980e02d82
|
|
| BLAKE2b-256 |
45e2b58f23fd43a90181d7d420735f3ed3182477e588ee0ea849ffc3b280be92
|
File details
Details for the file reo_census-0.1.0-py3-none-any.whl.
File metadata
- Download URL: reo_census-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
942f8598c61727ee4b0a67fc27c24538e40b7efede42fea1a5481de288c7ac38
|
|
| MD5 |
1644dfe786a2294858837af2bcbae658
|
|
| BLAKE2b-256 |
c558ba2438e4cdc4d44ff4b46a0c29895708884119e4fe04128d1b01ca04b166
|