Skip to main content

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

To view the docstring (explainer) of a particular function, use covidactnow.User.infRate.__doc__ where infRate can be repalced with any other function. For example, running print(covidactnow.User.freeBedPercentage.__doc__) will return: Get's the percentage of free hospital beds by state. Depending on your IDE, hovering over a function in the editor will show the function's docstring (works in VS Code).

import covidactnow

if __name__ == "__main__":
    print(covidactnow.User.infRate.__doc__)
    print(covidactnow.User.freeBedPercentage.__doc__)

""" Result:

>>> Gets today's COVID infection rate by state.
>>> Get's the percentage of free hospital beds by state.

"""

----
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](https://covidinfo.preritdas.com). 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).

Release files for covidactnow 1.1.76

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for covidactnow 1.1.76
File Size Uploaded
covidactnow-1.1.76.tar.gz 3.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for covidactnow 1.1.76
File Interpreter ABI Platform
covidactnow-1.1.76-py3-none-any.whl Python 3 none any Details

Total release size: 6.3 kB

Release files / covidactnow-1.1.76.tar.gz

Download URL covidactnow-1.1.76.tar.gz
Size 3.1 kB
Tags Source
SHA-256 checksum
How to use checksums
e21152c47eaf4d52fdd82c81db7f7aecf790586576623bd8a88ff7bb9547bf1c
BLAKE2b-256 checksum
How to use checksums
ce2089fd7d7556f6e4487f9059cd95e1e83c50c98f516d218a07b93ee479ac0f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

Release files / covidactnow-1.1.76-py3-none-any.whl

Download URL covidactnow-1.1.76-py3-none-any.whl
Size 3.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
159446c2b6fbcaa60fbf7f691f8e0b9ab8406940f0af4e7395bc2e5de8ae5e6e
BLAKE2b-256 checksum
How to use checksums
3a52c6424d1bd72e2f3b07eef5d0547715bcb639dc2b6d8b22c32f9e0bbcfe09
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.0 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10

Release history Release notifications | RSS feed

This release

1.1.76 This release

2 release files

1.1.75

2 release files

1.1.70

1 release file

1.1.61

2 release files

1.1.60

2 release files

1.1.50

2 release files

1.1.40

2 release files

1.1.30

2 release files

1.1.20

2 release files

1.1.7

2 release files

1.0.20

2 release files

1.0.10

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page