Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

COVID-19 DATA API

This package makes COVID-19 data available through python API. All the data are directy taken from the CSSEGISandData-covi19 with the below mentioned data sources. There are several methods to extract the statistics and counts for the coutry or province.

Installation:

Also available in pypi:

covid-data-api

From GitHub:

  • Clone this repo.
  • pip install -r requirements.txt
  • python setup.py install

How to user:

Initialising the instance/api:

from covid.api import CovId19Data

api = CovId19Data(force=False)

If force = True, every time object is instantiated new data is downloaded. Otherwise data will be refreshed after 24 hrs.

Method 1: Get stats:

Get the latest total stats for all confirmed, deaths and recovered till the latest date available.

res = api.get_stats()

Method 2: Get records for all the countries:

res = api.get_all_records_by_country()

Method 3: Get records for all the state/Province:

res = api.get_all_records_by_provinces()

Method 4: Filter by Country:

To find all the countries availabe, plese use show_all_available_countries api.

res = api.filter_by_country("ireland")

Method 5: Filter by Province/State:

To find all the countries availabe, plese use show_all_available_regions api.

res = api.filter_by_province("British Columbia")

Method 6: Show all available Countries:

res = api.show_available_countries()

Method 7: Show all valiable Province/State:

res = api.show_available_regions()

Method 8: Get history data for a given Country:

res = api.get_history_by_country("ireland")

Shows all the country metrics confirmed, recovered and deaths for the dates till the latest date.

Method 9: Get history data for a given State/Province:

res = api.get_history_by_province("British Columbia")

Shows all the state/province metrics confirmed, recovered and deaths for the dates till the latest date.

Data Sources:

All used data sources CSSEGISandData-covi19.

Support and Maintenance:

Please raise an issues with issues of this git repo. This is not actively supported, however anyone with the interest can solve the raised issues.

Copying and License

Terms and conditions of the data provider:

CSSEGISandData-covi19

Terms and Condition of this repo:

License: MIT

Authors:

see also contributors

ChangeLog:

  • 1.1, 1.2, 1.3 - Initial Versions

  • 1.4 - Change in recovered cases in source CoViD data repository.

Metadata

Release files for covid-data-api 1.5

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-data-api 1.5
File Size Uploaded Provenance Actions
covid-data-api-1.5.tar.gz 7.8 kB Without provenance Details for covid-data-api-1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for covid-data-api 1.5
File Interpreter ABI Platform Actions
covid_data_api-1.5-py3-none-any.whl Python 3 none any Details for covid_data_api-1.5-py3-none-any.whl

Total release size: 19.3 kB

Release files / covid-data-api-1.5.tar.gz

Download URL covid-data-api-1.5.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d5dc47ba204935a6e20b9c9e8fbd487200061012e724f4c68c092a0c47636ccf
BLAKE2b-256 checksum
How to use checksums
5dc30c8f63c30b72a1a2f9fd8b0a9af9475aec0fff2d2d6f2030ca8b57ad5151
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0.post20200309 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.10

Release files / covid_data_api-1.5-py3-none-any.whl

Download URL covid_data_api-1.5-py3-none-any.whl
Size 11.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ff6a1a29435e9a0eacf0fb2bc760d276908fce07ca75f6a45a0a5fb560c0d67
BLAKE2b-256 checksum
How to use checksums
4b0796a372886162c0f9a3bd67487e4426255999a996c736c7370b9dbe31c8ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0.post20200309 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.6.10

Security for covid-data-api 1.5

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