Skip to main content

COVID-19 API

coronavirus-api.net

This API is a wrapper around Johns Hopkins' https://github.com/CSSEGISandData/COVID-19 dataset.

Please abide by their terms of use with respect to how you use their data via this API.

Installation

This package is hosted on pypi

The recommended method of installation is through pipx.

pipx install covid-19

However, covid-19 can also be pip-installed as normal.

pip install covid-19

Website

The coronavirus api website allows several methods of slicing and dicing the data.

For example, the get_all endpoint (which returns all data) can be filtered for rows which only contain data for California and Colorado as of March 22nd in this way:

https://coronavirus-api.net/get_all?min_date=2020-03-22&states=["California", "Colorada"]

The main page will list the available endpoints and their available parameters.

CLI Usage

This package installs a command-line tool, covid

It lets you programmatically access John Hopkins' dataset via terminal commands or via a rest api that can itself be instantiated locally from the cli

covid --help

This API is a wrapper around Johns Hopkins' https://github.com/CSSEGISandData/COVID-19 dataset.

Please abide by their terms of use with respect to how you use their data via this API.


Available Commands:

 - get_all: Fetch all data from John Hopkins.
 - countries: Return all countries and regions in the dataset.
 - states: Return all states and provinces in the dataset.
 - for_date: Return all data for a specific date.
 - serve: Serve REST API locally.

i.e.

covid for_date 2020-03-21
[
    {
        "Province/State": "Hubei",
        "Country/Region": "China",
        "Last Update": "2020-03-22T09:43:06",
        "Confirmed": 67800.0,
        "Deaths": 3144.0,
        "Recovered": 59433.0,
        "Latitude": 30.9756,
        "Longitude": 112.2707
...

Docker

This package can also be run as a docker image.

docker run knowsuchagency/covid-19 --help

Metadata

Release files for covid-19 0.5.1

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

Source distribution (sdist)

Source distribution for covid-19 0.5.1
File Size Uploaded Provenance Actions
covid-19-0.5.1.tar.gz 5.0 kB Without provenance Details for covid-19-0.5.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for covid-19 0.5.1
File Interpreter ABI Platform Actions
covid_19-0.5.1-py3-none-any.whl Python 3 none any Details for covid_19-0.5.1-py3-none-any.whl

Total release size: 10.7 kB

Release files / covid-19-0.5.1.tar.gz

Download URL covid-19-0.5.1.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ccf223ad8f704e060cbfe0623fbf774db2a0e6bd187ed5eee1f038b8c59fa3b2
BLAKE2b-256 checksum
How to use checksums
55f7ebf5aa759564400880a144ccd2886f8eb076cc8704540455a557aa29681c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.8.2 Linux/5.0.0-1035-azure

Release files / covid_19-0.5.1-py3-none-any.whl

Download URL covid_19-0.5.1-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ef29c644a4bca0be756e567413e3969c8fe817d065ddda4a91e943d56d74a194
BLAKE2b-256 checksum
How to use checksums
e25e139b4cd9211dc731f5f788e841136f002cd9e3562147a7c11d5410d072c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.8.2 Linux/5.0.0-1035-azure

Security for covid-19 0.5.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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