Skip to main content

Documentation Status License GitHub stars PyPI version

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()
get_all()

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()
get_all()

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. To report the problem, contact me, the developer or create an issue.

Release files for corona-python 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for corona-python 1.0.1
File Size Uploaded
corona_python-1.0.1.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for corona-python 1.0.1
File Interpreter ABI Platform
corona_python-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 9.0 kB

Release files / corona_python-1.0.1.tar.gz

Download URL corona_python-1.0.1.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
45f482635fdc3d9d3f123516154f5e434638ee499611d610311d13ebc4bb18ab
BLAKE2b-256 checksum
How to use checksums
3ff7e2b15cca45faa086ae76e1c42b82cc356c8af15957fa31e79aa7ee793215
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.1

Release files / corona_python-1.0.1-py3-none-any.whl

Download URL corona_python-1.0.1-py3-none-any.whl
Size 5.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
45d806a6da9b5fdd8af12b2fa40fa2ca72ca336c6e2e812bb4e963d0af9bf4f2
BLAKE2b-256 checksum
How to use checksums
9488265123d1b0c2b258ba3a746d8ae2ee25a5214c76796d41e0f3aed645d025
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.1

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page