{"id":5923,"library":"etelemetry","title":"Etelemetry Python Client","description":"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.","status":"active","version":"0.3.1","language":"en","source_language":"en","source_url":"https://github.com/sensein/etelemetry-client","tags":["telemetry","client","versioning","project-info"],"install":[{"cmd":"pip install etelemetry","lang":"bash","label":"Install latest version"}],"dependencies":[],"imports":[{"symbol":"etelemetry","correct":"import etelemetry"}],"quickstart":{"code":"import etelemetry\nimport os\n\n# Example 1: Get project version information\nproject_info = etelemetry.get_project(\"nipy/nipype\")\nprint(f\"Project 'nipy/nipype' info: {project_info}\")\n\n# Example 2: Check for available and bad versions\n# Simulate project_version from your application\nmy_project_org = os.environ.get('ETELEMETRY_TEST_ORG', 'sensein')\nmy_project_name = os.environ.get('ETELEMETRY_TEST_PROJECT', 'etelemetry-client')\nmy_project_version = os.environ.get('ETELEMETRY_TEST_VERSION', '0.2.1') # Using an example old version\n\nfull_project_slug = f\"{my_project_org}/{my_project_name}\"\nprint(f\"\\nChecking version {my_project_version} for {full_project_slug}...\")\n\nversion_status = etelemetry.check_available_version(\n    full_project_slug,\n    my_project_version\n)\n\nif version_status and 'bad_versions' in version_status and my_project_version in version_status['bad_versions']:\n    print(f\"WARNING: You are using a known bad version ({my_project_version}) for {full_project_slug}. Please upgrade!\")\nelif version_status and 'version' in version_status and version_status['version'] != my_project_version:\n    print(f\"INFO: A newer version ({version_status['version']}) of {full_project_slug} is available. You are using {my_project_version}.\")\nelse:\n    print(f\"INFO: You are using the latest or a good version ({my_project_version}) for {full_project_slug}.\")\n","lang":"python","description":"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'."},"warnings":[{"fix":"Upgrade Python to 3.7 or newer. For example: `python3.9 -m pip install etelemetry`.","message":"Version 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`.","severity":"breaking","affected_versions":">=0.3.0"},{"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.","message":"When 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.","severity":"gotcha","affected_versions":"<all>"},{"fix":"Always provide the project identifier as a string following the 'github_org/project' pattern.","message":"The `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.","severity":"gotcha","affected_versions":"<all>"}],"env_vars":null,"last_verified":"2026-04-14T00:00:00.000Z","next_check":"2026-07-13T00:00:00.000Z"}