Skip to main content

coroapi is fast and up-to-date Covid-19 API

Project description

Covid-19 Tracker API :microbe:

Provides up-to-date data about Coronavirus outbreak. Includes numbers about confirmed cases, deaths and recovered.

Available data-sources:

Currently only 2 data-sources is available to retrieve the data:

  • Epidemic Stats - All statistics data about coronavirus COVID-19 comes from World Health Organization and Johns Hopkins CSSE. Charts includes number of infected, deaths and recovered.

  • Virusncov - All statistics data about coronavirus COVID-19 comes from World Health Organization

How it works

The module emulates the browser actions by sending requests to the site server. The module doesn't load any type of files while sending requests to the site and that makes it faster. The module is scraping the website source code, and returning the final result.

Features

  • Provides Fast, and Up-to-Date data about the Coronavirus outbreak
  • A lot of supported countries (up to 100)

Installation

  • pip3 install covid19-api

When there's new release, you need to update the package

  • pip3 install covid19-api==1.0 --upgrade

Simple Usage

# All results is right to today (1/22/2021)
# list of supported countries can be printed out | print(instance.countries)

import coroapi

instance = coroapi.Corona()

global_stats = instance.global_stats(text=False)
print(global_stats)

<< ['98135997', '2101562', '70548362', 'usa']

If there's any problem:

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

covid19-api-1.0.tar.gz (4.6 kB view details)

Uploaded Source

File details

Details for the file covid19-api-1.0.tar.gz.

File metadata

  • Download URL: covid19-api-1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5

File hashes

Hashes for covid19-api-1.0.tar.gz
Algorithm Hash digest
SHA256 d3cdbbe3be9b8edc4dc75c397f3f1ca6dfeaa411ebfb785063a04fc10e8c9963
MD5 40f90d49c6569b609c4e6ab443ab4960
BLAKE2b-256 f8a6c019a9067f39cb3e89aaf4cfdaf7f2175da7a74b40ca05464c3913ae82ab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page