Covid 19 API Wrapper
THE API CREDIT GOES TO corona.lmao.ninja, big thanks!
Their Discord
Python API Wrapper
Interacts with the API. Hopefully this saves some people a few steps :) Enjoy!
[Fixed] API endpoint changed to "corona.lmao.ninja/v2/"
UPDATE [...0.0.4] [Fixed]
Until this fix [~0.0.4], functionality was broken due to changes made to the API endpoint sometime today, April 17th, 2020.
All is well and working now :)
And remember: Social-distancing is key!!
Without using "countries" endpoint:
from Covid19ApiWrapper import *
#define the object
x = covidUpdate(BOOL_country_data=False)
print(x.totalCases)
print(x.totalDeaths)
print(x.totalRecovered)
print(x.timeUpdatedUnix)
Using both endpoints:
from Covid19ApiWrapper import *
#define the object
x = covidUpdate(BOOL_country_data=True)
print(x.totalCases)
print(x.totalDeaths)
print(x.totalRecovered)
print(x.timeUpdatedUnix)
#Possible Usage: cases, todayCases, deaths, todayDeaths, recovered, active, critical, casesPerOneMillion
print(x.countryData['China']['cases'])
print(x.countryData['China']['todayCases'])
Download/Interact With CDC World Map:
from Covid19ApiWrapper import *
#GET CURRENT CDC GLOBAL INFECTION MAP/LINKS
x = getCdcWorldMap()
print(x.WorldMapLocalFile)
print(x.WorldMapLink)
print(x.WorldMapHtml)
#GET FLAG LINKS/DOWNLOAD FLAG PNG
y = getCountryFlag("USA", download=True)
print(y.flagLink)
print(y.flagLocalFile)
print(y.flagHtml)
Enjoy and be safe!
Metadata
Release files for Covid19ApiWrapper 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| Covid19ApiWrapper-0.0.4.tar.gz | 3.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| Covid19ApiWrapper-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.1 kB
Release files / Covid19ApiWrapper-0.0.4.tar.gz
| Download URL | Covid19ApiWrapper-0.0.4.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
656931fddc238094c490d29f8e61618f86634adb1715ee4ad6ef065f3969f2bf
|
|
BLAKE2b-256 checksum How to use checksums |
90f18609a68e370deabca08ee7fb1cf8ecce85f807929472ebe1c0590eb539de
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.5
|
Release files / Covid19ApiWrapper-0.0.4-py3-none-any.whl
| Download URL | Covid19ApiWrapper-0.0.4-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
166afae9ad12d3e603f6b3359d8a804222e4f2d9798323d7a6f949fe86508e32
|
|
BLAKE2b-256 checksum How to use checksums |
eedc3db61997473a16cb79059a1c6da5f6184b5477fe93378132ea310349cf43
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.5
|
Security for Covid19ApiWrapper 0.0.4
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.