Skip to main content

Etelemetry python client API

Project description

Etelemetry-client

Build Status codecov

A lightweight python client to communicate with the etelemetry server

Installation

pip install etelemetry

Usage

import etelemetry
etelemetry.get_project("nipy/nipype")

{'version': '1.4.2', 'bad_versions': ['1.2.1', '1.2.3', '1.3.0']}

or to take advantage of comparing and checking for bad versions, you can use the following form

import etelemetry
etelemetry.check_available_version("nipy/nipype", "1.2.1") # github_org/project

A newer version (1.4.2) of nipy/nipype is available. You are using 1.2.1
You are using a version of nipy/nipype with a critical bug. Please use a different version.
returns: {'version': '1.4.2', 'bad_versions': ['1.2.1', '1.2.3', '1.3.0']}

Adding etelemetry to your project

You can include etelemetry in your project by adding etelemetry package to your setup process and by adding the following snippet to your __init__.py. The code snippet below assumes you have a __version__ and usemylogger (logger) variables available. The check takes the form of github_org/project.

# Run telemetry on import for interactive sessions, such as IPython, Jupyter
# notebooks, Python REPL
import __main__

if not hasattr(__main__, "__file__"):
    import etelemetry
    etelemetry.check_available_version("dandi/dandi-cli", __version__, lgr=usemylogger)

To add support checking for bad versions you will need to add a file named .et to your github project containing a simple json snippet.

{ "bad_versions" : []
}

Here is an example: https://github.com/nipy/nipype/blob/master/.et

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

etelemetry-0.2.1.tar.gz (20.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

etelemetry-0.2.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file etelemetry-0.2.1.tar.gz.

File metadata

  • Download URL: etelemetry-0.2.1.tar.gz
  • Upload date:
  • Size: 20.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.5

File hashes

Hashes for etelemetry-0.2.1.tar.gz
Algorithm Hash digest
SHA256 bfb58f58e98f63eae20caffb8514fb68c572332aa6e773cf3fcbde9b408d88e7
MD5 799e205b2998e9df350556f8898b84b0
BLAKE2b-256 6e35e684ac76f9044b888d9d1961e93e38c9b12bfb4f6d2eaf17329109b8e770

See more details on using hashes here.

File details

Details for the file etelemetry-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: etelemetry-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.5

File hashes

Hashes for etelemetry-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b2b459c986c482fa6aaae87e891904751af21728ccd4e1346396c684a7a4eb6f
MD5 ecfe5185c7d03bd00bc1755a4c5b7e86
BLAKE2b-256 50fe7b4a4d7bd2756884ba2af5445ac538bff20ca8e6c89e24b253cc51845f1b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page