A Python 3 wrapper for the COVID-19 API
Project description
corona_python
A Python API Wrapper for coronavirus stats
Installation
To install corona-python, do:
pip install corona-python
or
python -m pip install corona-python
Usage
from corona_python import Country
country = Country("USA")
print(country.total_cases())
More examples are provided in the examples folder
Documentation
Documentation can be found here
Functions
Country:
last_updated()
flag()
total_cases()
today_cases()
total_deaths()
today_deaths()
recovered()
today_recovered()
active()
critical()
cases_per_one_million()
deaths_per_one_million()
total_tests()
tests_per_one_million()
population()
continent()
one_case_per_people()
one_death_per_people()
one_test_per_people()
World:
last_updated()
total_cases()
today_cases()
total_deaths()
today_deaths()
recovered()
today_recovered()
active_cases()
critical_cases()
cases_per_one_million()
deaths_per_one_million()
total_tests()
population()
affected_countries()
tests_per_one_million()
one_case_per_people()
one_death_per_people()
one_test_per_people()
active_per_million()
recovered_per_million()
critical_per_million()
More detailed explanations of the functions can be found in the docs
Errors
The module will raise KeyError
if the given country is invalid
If the module doesn't return anything, there might be a problem with the API
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
corona_python-0.2.0.tar.gz
(3.5 kB
view hashes)
Built Distribution
Close
Hashes for corona_python-0.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a85db2b03923e6e076142e8675bbe0319804b3924fbdbaf37361e83510b53f67 |
|
MD5 | f3d9e64620e2bf704676e9a432cd9fe9 |
|
BLAKE2b-256 | 3394c8810f41cc94b36f6c52ba42f6e1b7e4b3625bdc095a816b8701c18356dc |