Disease-py

Latest version: v1.0.1

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

Scan your dependencies

Page 1 of 4

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

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]`

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.