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
muslpy 3.10–3.920 runs
installs and imports cleanly · install 0.0s · import 0.035s · 22.1MB
glibcpy 3.10–3.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}.")
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.
fixCheck 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.
fixEnsure 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.
fixDefine 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.
fixUpgrade 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.