covid19-webservice | Lightweight Python web-service for querying Coronavirus COVID-19 statistics

First of all, my most sincere condolences to those who lost someone in this tragedy!
And for those who got infected I wish them a full recovery soon!

covid19-webservice is a simple Python webservice to provide the latest statistics about Coronavirus COVID-19 in JSON format.

The idea of writing this piece of software came to me after returning from my vacation in Slovenia, as one of my friends asked me about the Coronavirus situation there, but I really had no idea! (When I came back it was 0 infected, now  sadly is 16!)

So I’ve done some readings on the matter and I was quite surprised by the numbers around the world, and decided to start working on my covid19-webservice!
This webservice is useful for:

  • Developing monitoring/alerting apps about the virus outbreak.
  • Developing maps about the virus outbreak.
  • Writing command line tools about the virus outbreak (Only Linux/Unix people will relate to that one!)

Enough talking and let’s have a look on how it works!

At the moment of writing this article, I have the following endpoints:

/get/statistics/confirmed
/get/statistics/recovered
/get/statistics/deaths
/get/statistics/all
/get/country/all
/get/city/all
/get/country/name/<country>
/get/city/name/<country>/<city>

Here’s the output of calling /get/statistics/all:

/get/city/name/Deutschland/Bayern:

/get/country/all:

I’ve used the following technologies to get that PoC ready:

  • Flask (Web framework)
  • Pandas (Data Analysis Library)
  • gevent.pywsgi (WSGI server)

If you are not really into the software development and looking for something that is just ready to use with a nice interface, I highly recommend this one for you!

Stay safe and take care!

Don’t forget to star it on Github if you liked it 😉

 

2 thoughts on “covid19-webservice | Lightweight Python web-service for querying Coronavirus COVID-19 statistics

  1. Simon

    Nice one!…cannot manage to call city, or ‘state’…also i was looking several days for a powerful dashboard you provided in the links.

    Reply

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s