Skip to content

joeVenner/CoronaStatsAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CoronaStatsAPI

CoronaStatsAPI is a Python Rest API To Get The Latest Corona Statistics In Every Country

Request To the API

Logo

This is a screenshot from POSTMAN(it's an app to make web requests) it returns a json of the COVID19 Stats in US.


Installation

You can download CoronaStatsAPI source code by cloning the Git Repo and simply installing its requirements:

~ ❯❯❯ git clone https://github.com/joeVenner/CoronaStatsAPI.git

~ ❯❯❯ cd CoronaStatsAPI/

~/CoronaStatsAPI ❯❯❯ pip install -r requirements.txt

~/CoronaStatsAPI ❯❯❯flask CoronaStatsAPI.py

Usage

Make a Post or Get request to the link https://covidstatistics.herokuapp.com/usa
You can change the 'usa' by any other country name like : india,uk,spain,france...

Python
  import requests
  response = requests.get('https://covidstatistics.herokuapp.com/usa')
  data = response.json()
  print(data)
Output: 

{'ActiveCases': '824,466',
 'Continent': 'North America',
 'Country': 'USA',
 'Deaths/1m': '175',
 'NewCases': '+11,909',
 'NewDeaths': '+1,065',
 'SeriousCritical': '14,145',
 'Tests/1m': '17,471',
 'TotCases/1m': '3,088',
 'TotalCases': '1,022,265',
 'TotalDeaths': '57,862 ',
 'TotalRecovered': '139,937',
 'TotalTests': '5,782,860'})

Author: Joe.

About

Python Rest API For Latest Corona Statistics In Every Country (Source worldometers)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages