Registry / observability / etelemetry

etelemetry

JSON →
library0.3.1pypypi✓ verified 86d ago

Etelemetry is a lightweight Python client API designed to communicate with the etelemetry server. It allows projects to check for available versions, identify 'bad' versions, and report usage statistics. The current version is 0.3.1. Releases appear to be ad-hoc but active, with the latest significant update in October 2023.

pip install etelemetry
INSTALL
IMPORT
SIG · ETELEMETRY
E
etelemetry
observabilitypythonv0.3.1
Install
2.4s avg
Import
33ms
Disk
20MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.3.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.920 runs
installs and imports cleanly · install 0.0s · import 0.035s · 22.1MB
glibc
py 3.103.920 runs
installs and imports cleanly · install 2.4s · import 0.031s · 23MB
20MB installed
● package 20MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

etelemetry
import etelemetry

This quickstart demonstrates how to use `etelemetry.get_project` to fetch metadata for a GitHub project and `etelemetry.check_available_version` to compare a local project's version against the etelemetry server's records, including known 'bad' versions. The project reference should be in the format 'github_org/project'.

import etelemetry import os # Example 1: Get project version information project_info = etelemetry.get_project("nipy/nipype") print(f"Project 'nipy/nipype' info: {project_info}") # Example 2: Check for available and bad versions # Simulate project_version from your application my_project_org = os.environ.get('ETELEMETRY_TEST_ORG', 'sensein') my_project_name = os.environ.get('ETELEMETRY_TEST_PROJECT', 'etelemetry-client') my_project_version = os.environ.get('ETELEMETRY_TEST_VERSION', '0.2.1') # Using an example old version full_project_slug = f"{my_project_org}/{my_project_name}" print(f"\nChecking version {my_project_version} for {full_project_slug}...") version_status = etelemetry.check_available_version( full_project_slug, my_project_version ) if version_status and 'bad_versions' in version_status and my_project_version in version_status['bad_versions']: print(f"WARNING: You are using a known bad version ({my_project_version}) for {full_project_slug}. Please upgrade!") elif version_status and 'version' in version_status and version_status['version'] != my_project_version: print(f"INFO: A newer version ({version_status['version']}) of {full_project_slug} is available. You are using {my_project_version}.") else: print(f"INFO: You are using the latest or a good version ({my_project_version}) for {full_project_slug}.")
Debug
Known issues
breakingVersion 0.3.0 dropped support for Python 3.6. Users on Python 3.6 or older must upgrade their Python environment before upgrading to `etelemetry>=0.3.0`.
fix
Upgrade Python to 3.7 or newer. For example: `python3.9 -m pip install etelemetry`.
affects: >=0.3.0
gotchaWhen integrating `etelemetry` into a project's `__init__.py` for automated version checking, the snippet provided in documentation assumes the presence of `__version__` and a logger instance (e.g., `usemylogger`). Ensure these variables are defined in your module or adapt the snippet accordingly.
fix
Ensure `__version__` is defined in your package's `__init__.py` and a logger object is available where the `check_available_version` function is called.
affects: <all>
gotchaThe `get_project` and `check_available_version` functions expect project identifiers in the format 'github_org/project' (e.g., 'nipy/nipype'). Incorrect formatting will result in errors or no data found.
fix
Always provide the project identifier as a string following the 'github_org/project' pattern.
affects: <all>
Errors
Common errors & fixes
TimeoutError: timed out
The `etelemetry` client attempted to connect to the etelemetry server (e.g., rig.mit.edu) to fetch project information or check versions, but the connection timed out, possibly due to the server being offline or network issues.
fix
Check your network connectivity. If the etelemetry server is known to be offline, there may not be a client-side fix other than waiting or configuring a custom endpoint if the library supports it (version 0.3.0-2 had a PR for custom endpoints).
NameError: name '__version__' is not defined
When integrating `etelemetry.check_available_version` into a project's `__init__.py` for automated version checking, the provided code snippet assumes that a `__version__` variable is defined within that module, but it is missing.
fix
Ensure that `__version__` is defined in your package's `__init__.py` file (e.g., `__version__ = '0.1.0'`) before calling `etelemetry.check_available_version`.
NameError: name 'usemylogger' is not defined
Similar to the `__version__` error, the `etelemetry.check_available_version` snippet expects a logger instance, typically named `usemylogger`, to be available when it's called in `__init__.py`, but this logger object has not been defined.
fix
Define a logger instance (e.g., `import logging; usemylogger = logging.getLogger(__name__)`) in your module before calling `etelemetry.check_available_version` and pass it as the `lgr` argument.
etelemetry Python 3.6 not supported
Starting with version 0.3.0, `etelemetry` dropped support for Python 3.6, leading to various potential errors (e.g., `ModuleNotFoundError` during installation, or `SyntaxError` during execution) if used in an unsupported environment.
fix
Upgrade your Python environment to version 3.7 or newer. For example: `python3.9 -m pip install etelemetry`.
Upgrade
Version history
0.3.1latest on PyPI · released Oct 13, 2023
Audit
Dependencies

No dependency data recorded yet.

Agent activity
20 hits · last 30 days
node
16
OpenAI (training)
2
Amazon
1
Resources
etelemetry — pip install etelemetry · libregistry