A basic API wrapper to interact with https://corona.lmao.ninja/.
Project description
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!
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'])
Enjoy and be safe!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for Covid19ApiWrapper-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad031ad02d419f731f30853aa5b2a8f2ed544eb2d55779dd149abddad2dfd15f |
|
MD5 | 975b17c5362ca1a9d00b02c5a3faee5b |
|
BLAKE2b-256 | 1ab035027e0ee8c138c958ce1d1e89cd9cb9aec204f5c53e978c6ef1bc0a48e7 |