etelemetry


Nameetelemetry JSON
Version 0.3.1 PyPI version JSON
download
home_pagehttps://github.com/sensein/etelemetry-client
SummaryEtelemetry python client API
upload_time2023-10-13 15:13:16
maintainerMathias Goncalves
docs_urlNone
authorSenseable Intelligence Group
requires_python>=3.7
licenseApache License, 2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ## Etelemetry-client

[![Build Status](https://travis-ci.org/sensein/etelemetry-client.svg?branch=master)](https://travis-ci.org/sensein/etelemetry-client)
[![codecov](https://codecov.io/gh/sensein/etelemetry-client/branch/master/graph/badge.svg)](https://codecov.io/gh/sensein/etelemetry-client)

A lightweight python client to communicate with the etelemetry server

### Installation

```
pip install etelemetry
```

### Usage

```python
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

```python
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`.

```python
# 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. 

```json
{ "bad_versions" : []
}
```

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

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sensein/etelemetry-client",
    "name": "etelemetry",
    "maintainer": "Mathias Goncalves",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "satra@mit.edu",
    "keywords": "",
    "author": "Senseable Intelligence Group",
    "author_email": "",
    "download_url": "",
    "platform": null,
    "description": "## Etelemetry-client\n\n[![Build Status](https://travis-ci.org/sensein/etelemetry-client.svg?branch=master)](https://travis-ci.org/sensein/etelemetry-client)\n[![codecov](https://codecov.io/gh/sensein/etelemetry-client/branch/master/graph/badge.svg)](https://codecov.io/gh/sensein/etelemetry-client)\n\nA lightweight python client to communicate with the etelemetry server\n\n### Installation\n\n```\npip install etelemetry\n```\n\n### Usage\n\n```python\nimport etelemetry\netelemetry.get_project(\"nipy/nipype\")\n\n{'version': '1.4.2', 'bad_versions': ['1.2.1', '1.2.3', '1.3.0']}\n```\n\nor to take advantage of comparing and checking for bad versions, you\ncan use the following form\n\n```python\nimport etelemetry\netelemetry.check_available_version(\"nipy/nipype\", \"1.2.1\") # github_org/project\n\nA newer version (1.4.2) of nipy/nipype is available. You are using 1.2.1\nYou are using a version of nipy/nipype with a critical bug. Please use a different version.\nreturns: {'version': '1.4.2', 'bad_versions': ['1.2.1', '1.2.3', '1.3.0']}\n```\n\n### Adding etelemetry to your project\n\nYou can include etelemetry in your project by adding `etelemetry` package to your setup process \nand by adding the following snippet to your `__init__.py`. The code snippet below assumes you \nhave a `__version__` and `usemylogger` (logger) variables available. The check takes the form \nof `github_org/project`.\n\n```python\n# Run telemetry on import for interactive sessions, such as IPython, Jupyter\n# notebooks, Python REPL\nimport __main__\n\nif not hasattr(__main__, \"__file__\"):\n    import etelemetry\n    etelemetry.check_available_version(\"dandi/dandi-cli\", __version__, lgr=usemylogger)\n```\n\nTo add support checking for bad versions you will need to add a file named\n`.et` to your github project containing a simple json snippet. \n\n```json\n{ \"bad_versions\" : []\n}\n```\n\nHere is an example: https://github.com/nipy/nipype/blob/master/.et\n",
    "bugtrack_url": null,
    "license": "Apache License, 2.0",
    "summary": "Etelemetry python client API",
    "version": "0.3.1",
    "project_urls": {
        "Homepage": "https://github.com/sensein/etelemetry-client"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8327f997c9da0e179986fadd6c8474d16743f1b3697c129c2fcd1e739cd038c2",
                "md5": "6db146b9551a0b4c14860d176bdcf546",
                "sha256": "a64f09bcd55cbfa5684e4d9fb6d1d6a018ab99d2ea28e638435c4c26e6814a6b"
            },
            "downloads": -1,
            "filename": "etelemetry-0.3.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6db146b9551a0b4c14860d176bdcf546",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 6416,
            "upload_time": "2023-10-13T15:13:16",
            "upload_time_iso_8601": "2023-10-13T15:13:16.067591Z",
            "url": "https://files.pythonhosted.org/packages/83/27/f997c9da0e179986fadd6c8474d16743f1b3697c129c2fcd1e739cd038c2/etelemetry-0.3.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-13 15:13:16",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sensein",
    "github_project": "etelemetry-client",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "etelemetry"
}
        
Elapsed time: 0.14534s