Corona-api

Latest version: v0.9.0

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

Scan your dependencies

Page 1 of 4

0.8.8

New attributes for `GlobalStatistics`, `CountryStatistics` and `ContinentStatistics`;
- `active_per_million`
- `recoveries_per_million`
- `critical_per_million`
- `population`
All of those should be pretty self explanatory.

0.8.7

Support for `allow_none` in the following methods;
- `get_single_state()`
- `get_all_states()`
- `get_state_list()`
- `gov_country()`

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` means `None` values can be returned
- `allow_none=False` means that all `null` values will be returned as `0`

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. Returns `List[str]`
- `gov_country(country)` - Get the data from the country's government. Could return either `dict` or `List[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 in `day, month, year, hour, minute, second`.

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.