Getting Started¶
Install¶
To install corona-python, do:
1 | pip install corona-python
|
or
1 | python -m pip install corona-python
|
Examples¶
1 2 3 4 | from corona_python import Country
country = Country("USA")
print(country.total_cases())
|
More examples are provided in the examples folder
Function List¶
Country:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 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:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 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 Functions
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