A wrapper allowing users to get specific state-based COVID statistics from the Covid Act Now database.
Project description
Covid Act Now Database Wrapper
This package is an extremely bare-bones wrapper around Covid Act Now's database of COVID-19 related information. View the PyPi project here, and the original post page here.
Usage is simple. Install the package with pip install covidactnow
.
Instantiate a user object with your API key as an argument. You can easily generate an API key here.
import covidactnow
api = covidactnow.User(api_key = 'yourapikey')
washingtonInfectionRate = api.infRate('WA')
massachussettsVaxRate = api.vaxRate('MA')
print(f"{washingtonInfectionRate = }")
print(f"{massachussettsVaxRate = }")
This will result (with different data, of course):
washingtonInfectionRate = 1.16
massachussettsVaxRate = 76.3
For more information on how the wrapper works, particularly how it was redesigned to be package-friendly, read the "Updated for Distribution" section of this page. Note that this version has been updated to get data from within a User
class allowing individual API keys to be used (as opposed to defining a state as an object and defining statistics as object attributes).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for covidactnow-1.1.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ac7a45ce04f1146a3500fc91bcdd246a3b83310e4d0fb68369073e14a53f228 |
|
MD5 | 9c28812e0ed9c600ce448f0dd3cc5aea |
|
BLAKE2b-256 | abe402622b7101e858e03633bfa55ebf8211e90ef57d5fdebc78f7463e632711 |