Releases: apex2504/disease.py
1.2.0
Adds support for vaccine tracking.
New methods for Covid
vaccine_coverage(last_days='all')
-> returnsList[VaccineTimeline]
vaccine_countries(last_days='all')
-> returnsList[VaccineCountry]
vaccine_country(last_days='all')
-> returnsVaccineCountry
New classes in covidstatistics
VaccineTimeline
date
:datetime
value
:int
VaccineCountry
country
:str
timeline
:List[VaccineTimeline]
1.1.0
0.9.0
Support for the new twoDaysAgo
parameter for the API in the form of two_days_ago=True/False
. See README for documentation. Please note that a ValueError
will be raised if you use both yesterday=True
and two_days_ago=True
.
New attributes
GlobalStatistics
today_recoveries
one_case_per_people
one_death_per_people
one_test_per_people
CountryStatistics
today_recoveries
one_case_per_people
one_death_per_people
one_test_per_people
ContinentStatistics
today_recoveries
0.8.8
0.8.7
0.8.6
Support for the new allowNull
parameter. This is to say whether or not null
values are given as 0
or None
. The format_number
util has also been updated to return 'Unknown'
when a None
value is passed.
allow_none=True
meansNone
values can be returnedallow_none=False
means that allnull
values will be returned as0
Usage
allow_none=True/False
Supported methods
all()
get_country_data()
get_all_countries()
get_country_list()
get_single_continent()
get_all_continents()
0.8.5
bug fix to JHU data returning the wrong county name.
base URL changed to https://disease.sh/v2
0.8.4
Supports new /v2/gov
endpoints. Due to the fact that different data will be provided by different countries, we cannot create a unified class for the returned data. As a result, the data returned will either be a dict or a list of dicts. To get a list of the available attributes, you can use list(dict.keys())
.
New methods
gov_supported_countries()
- Get a list of all the supported countries. ReturnsList[str]
gov_country(country)
- Get the data from the country's government. Could return eitherdict
orList[dict]
0.8.2
Internal changes to yesterday
and sort
params. In terms of usage and syntax, they are exactly the same as before.
New methods
get_jhu_all_counties()
- get a list of all counties supported by JHU and their data -List[JhuCsseStatistics]
New utils
parse_date(datetime.datetime)
- Split a datetime.datetime into its various parts, useful for formatting date yourself. Data returned inday, month, year, hour, minute, second
.