GithubHelp home page GithubHelp logo

e4-client's Introduction

e4-client

pypi_version_badge build_badge

Client to download information of the E4 Connect platform.

Installation

The installation can be performed either with pip (recommended) or manually (using the local setup.py). It installs both the e4client command line utlity and the e4client package (that contains the logic of the client in the E4Connect class).

PIP installation:

$ pip install e4client

Local installation:

$ python setup.py install

Usage

$ e4client [-h] [-u USER] [-p PWD] [-a] [-i SESSION_ID] [-l] [-o OUT]

    -h, --help    Help message

    -u USER, --user USER    Username.

    -p PWD, --pwd PWD    Password.

    -a, --all_sessions    Downloads all sessions of a user.

    -i SESSION_ID, --session_id SESSION_ID    Downloads a specific session.

    -r SESSION_ID, --remove SESSION_ID    Removes a specific session.

    -l, --sessions_list    Downloads the list of sessions in CSV format. It includes the following columns: id, device_id duration, status, start_time, label device, exit_code.

    -p, --purchased_devs    Downloads the list of purchses devices in CSV format. It includes the following columns: device_id, label, model, hardware_code, purchase_code, purchase_id.

    -f USERS_FILE, --users_file USERS_FILE    Read users from file. Accepted files are composed of ":" pairs (one per line).

    -o OUT, --out OUT    Output file or path.

Authentication through environment variables

The username and the password can also be specified using environment variables. In Linux they can be specified as follows:

$ export E4_USER=[username]
$ export E4_PWD=[password]

Examples

$ python3 emp-client.py -u [email protected] -p pass -a -o out

Downloads all the episodes in the out folder.

$ python3 emp-client.py -i 67677

Downloads the session that has 67677 as identifier. Since no credentials are specified, it is assumed that they are registered in the environment variables.

$ python3 emp-client.py -r 67677

Removes de session with ID 67677.

$ python3 emp-client.py -l -o output.csv

Downloads the list of episodes as a CSV (output.csv).

$ python3 emp-client.py -p

Downloads the list of purchased devices.

$ python3 emp-client.py -f users.txt -a

Downloads all the episodes of the patients specified in the users.txt file.

$ python3 emp-client.py -f users.txt -a -l -d

Downloads all the episodes of the patients specified in the users.txt file, including in each user folder the related sessions and purchased devices files.

Documentation

To use the E4 client as a library the e4client package can be imported. Inside its E4Connect class different methods to retrieve the information of the platform are defined. It can be imported as follows:

from e4client import E4Connect

Documentation can be accessed here.

e4-client's People

Contributors

khvilaboa avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.