A Python Wrapper around the COVID-19 API 'https://github.com/marlon360/rki-covid-api'.
Project description
Example
import json
from covid19pyclient import CovidData
covid = CovidData()
data = covid.germany_total()
print(json.dumps(data, sort_keys=True, indent=4, ensure_ascii=False))
{
"cases": 3682911,
"casesPer100k": 4428.3475391975035,
"casesPerWeek": 29248,
"deaths": 88595,
"delta": {
"cases": 1785,
"deaths": 153,
"recovered": 11714
},
"meta": {
"contact": "Marlon Lueckert (m.lueckert@me.com)",
"info": "https://github.com/marlon360/rki-covid-api",
"lastCheckedForUpdate": "2021-06-01T08:17:40.241Z",
"lastUpdate": "2021-05-31T23:00:00.000Z",
"source": "Robert Koch-Institut"
},
"r": {
"date": "2021-05-27T00:00:00.000Z",
"value": 0.91
},
"recovered": 3498382,
"weekIncidence": 35.16791712491793
}
Featured Data
- Total number of COVID-19 related cases, deaths, incidence, recovered (country, by state, by district, by demographics)
- Timeseries data (country, districts, vaccinations, tests)
- And data derived therefrom
Installation
You can install covid19pyclient with pip.
$ pip install covid19pyclient
Alternatively, you can download and install covid19pyclient from github:
$ pip install git+https://github.com/NiklasTiede/Covid19PyClient
How to use
CovidData's class methods return the requested as dictionary.
from covid19pyclient import CovidData
covid = CovidData()
Here's a list of all the methods which can be used to access different data about COVID-19 in germany:
covid.germany_total()
covid.germany_timeseries()
covid.germany_by_agegroups()
covid.districts_total()
covid.districts_timeseries()
covid.states_total()
covid.states_by_agegroups()
covid.vaccinations_total()
covid.vaccinations_timeseries()
covid.testing_timeseries()
For more information about these function, see Documentation.
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 covid19pyclient-1.0.0.tar.gz.
File metadata
- Download URL: covid19pyclient-1.0.0.tar.gz
- Upload date:
- Size: 201.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
add229f566964b03151201578542695b6b6040700624c3c12976eacbe4189a64
|
|
| MD5 |
465648bf708621bb3e67d29676ce2ca0
|
|
| BLAKE2b-256 |
61238b91dc0ddaec7d384a589ab77703db1a614349d74e3cb29f8a8f1388d4d8
|
File details
Details for the file covid19pyclient-1.0.0-py3-none-any.whl.
File metadata
- Download URL: covid19pyclient-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.14.0 pkginfo/1.7.0 requests/2.25.1 setuptools/52.0.0.post20210125 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f8e0a33e0f0459050bf97ffa8162f09cd26384346093a432e78563849b17e43
|
|
| MD5 |
3442f5168fa7026879642957bdc70174
|
|
| BLAKE2b-256 |
0cee2084f903dce18e2ec98f13a17fca1b3095efaea34425d9b4758c38043935
|