GIDEON provides epidemiological data going back to 1348 AD. This package provides an interface with the GIDEON API to access its Infectous Disease database within Python.
Project description
GIDEON - Python Interface (BETA)
A package for accessing the GIDEON API using Python.
The gideon_api package provides functions to access the GIDEON API without the need of writing your own REST API queries.
GIDEON Authentication
- The GIDEON API requires the use of an API key, which can be set in two ways:
- The package will attempt to read the environment variable
$GIDEON_API_KEY, which is set to your GIDEON API key.- The API key can be set either in the terminal for the current terminal session only or the
$HOME/.bashrcfile for persistent storage. In either case, set the API key with the lineexport GIDEON_API_KEY=<YOUR API KEY>
- The API key can be set either in the terminal for the current terminal session only or the
- The GIDEON API key can be updated within Python by calling the function
gideon_api.set_api_key(<YOUR API KEY>). Be sure to protect your key and not store it in code or a repository shared with others.
Basic Installation
$ pip install --user gideon-api
Developer Installation
Install the Python Virtual Environment
- Install the
pipenvPython environment manager.- Install the
pipenvPython package to your Python user install directory with the following terminal command:$python3 -m pip install --user pipenv
- Install the
- Install the developer virtual environment.
Change directory to the repository root and execute the terminal command
$python3 -m pipenv install --dev - From the repository root or an of its subdirectories, enter the virtual environment with the command
$python3 -m pipenv shell
Build and Install the gideon_api Package.
- From the root directory,
$pip install -e . - The
-e/--editableflag allows the developer to not have to reinstall the package when the Python files are updated.
Build the HTML Documentation
- Activate the project's pipenv environment. Follow step #3 from the "Install the Virtual Environment" section.
- Change directory to the repository's
docs/directory, one level below the root of the repository. - Run
make htmlto build the HTML documents in thebuild/subdirectory. If thebuild/directory does not exist, it will be generated by themake htmlcommand.
Functionality Overview
GIDEON ID Codes
Many of the items in the GIDEON database use a unique identifier code, such as diseases, bacteria, drugs, etc. Refer to the GIDEON ID Codes Documentation for a list of lookup functions.
Outbreak Data
The following command will query the GIDEON API for particular outbreak data:
gideon_api.outbreaks_by_yeargideon_api.outbreaks_by_country_yeargideon_api.latest_outbreaks_by_countrygideon_api.outbreaks_by_diseasegideon_api.endemic_countries_by_diseasegideon_api.endemic_diseases_by_country
Query the GIDEON API Directly
gideon_api.query: This is the main function users should use to send commands to the GIDEON APIgideon_api.query_online: This version should be used to process the request without interacting with the cache and provides lower level response data.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gideon-api-0.3.0.tar.gz.
File metadata
- Download URL: gideon-api-0.3.0.tar.gz
- Upload date:
- Size: 17.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0f034e29396eddec9145ae7960c36fcda24ebee5347c4c959bc5b93028b26612
|
|
| MD5 |
5a6b9f14de4c3efb697d14999a48a902
|
|
| BLAKE2b-256 |
2a70ca7d0834d561db81ae803c74163aa73d21933612b10d798e79aabb1ae8d0
|
File details
Details for the file gideon_api-0.3.0-py3-none-any.whl.
File metadata
- Download URL: gideon_api-0.3.0-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
907b4a650b8b164c6b2d9f80a7d39e37921133a20399cafb384e6223179c2aed
|
|
| MD5 |
f58709350308d238a5df635657873550
|
|
| BLAKE2b-256 |
d6041d1def91e641ba10b7fddd20e7478840655e848068dc9c2ea22b2a4c7895
|