Corona-api

Latest version: v0.9.0

Safety actively analyzes 687881 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 4

0.8.1

For NYT methods, all `date` members have been changed to `datetime.datetime`

0.8.0

Base URL updated to `https://corona.lmao.ninja/v2`

For historical data from JHU CSSE, the `date` attribute has changed to a `datetime.datetime` to allow for support with the `format_date` util.

New classes
`AppleSubregions`
- `country` - the name of the country - `str`
- `subregions` - a list of supported subregions - `List[str]`

`AppleSubregionStatistics`
- `subregion` - the name of the subregion - `str`
- `statistics` - a the statistics for the subregion - `List[AppleMobilityData]`

`AppleMobilityData`
- `name` - the name of the subregion - `str`
- `type` - the type of place. Will probably be 'sub-region' - `str`
- `date` - the date of the data - `datetime`
- `driving` - the value of driving - `float`/`None`
- `transit` - the value of transit - `float`/`None`
- `walking` - the value of walking - `float`/`None`

New methods
- `client.apple_all_countries()` to get a list of supported countries. Returns `List[str]`
- `client.apple_subregions(country)` to get a list of supported subregions within a country. Returns `AppleSubregions`
- `client.apple_mobility_data(country, subregion)` to get all the mobility data for the specified region. Returns `AppleSubregionStatistics`

0.7.5

Richer errors for some methods.

New method: `Client.get_country_list('a', 'few', 'countries', yesterday=True)` - Gets the data for more than one country. Supports `yesterday` parameter.

0.7.4

Support for new NY Times endpoints, as well as add a country list in continent.

New methods
- `get_nyt_usa_data()` - Get historical data for the US from the NY Times database. Returns `List[NewYorkTimesUsaStatistics]`
- `get_nyt_all_states()` - Get historical data for all states from NY Times. Returns `List[NewYorkTimesStateStatistics]`
- `get_nyt_single_state(state)` - Get historical data from NYT for a single state. Returns `List[NewYorkTimesStateStatistics]`
- `get_nyt_all_counties()` - Get historical data for all counties of all states from NY Times. Returns `List[NewYorkTimesCountyStatistics]`
- `get_nyt_single_county(state)` - Get historical data from NYT for a county of a certain name. Returns `List[NewYorkTimesCountyStatistics]`

0.7.0

Moved all endpoints to v2, and changed more methods.

All methods involving getting yesterday's data and sorted data have been removed and replaced with kwargs in existing methods.

`get_sorted_data()` -> `get_all_countries(sort='mode')`
`yesterday_all()` -> `all(yesterday=True)`
`yesterday_country(country)` -> `get_country_data(country, yesterday=True)`

Supports `yesterday` kwarg only:
- `all(yesterday=True)`
- `get_country_data(country, yesterday=True)`
- `get_single_state(state, yesterday=True)`
- `get_single_continent(continent, yesterday=True)`
Supports both `yesterday` and `sort` kwargs:
- `get_all_countries(yesterday=True, sort='mode')`
- `get_all_states(yesterday=True, sort='mode')`
- `get_all_continents(yesterday=True, sort='mode')`

New methods
- `get_all_continents(yesterday=True, sort='mode')` - Get the stats for all continents. Returns `List[ContinentStatistics]`
- `get_single_continent(continent, yesterday=True)` - Get the stats for a single continent. Returns a single `ContinentStatistics`

0.6.6

Support for new data given my existing endpoints, as well as support for new /usacounties endpoint

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.