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 😉

 

BWTop | CLI tool to monitor network traffic rate

BWTop is my latest project in my Python learning path, I hope you all enjoy it 🙂

BWTop

BWTop’s default behaviour is to monitor all interfaces and return with a KB/s rate every one second in a nice colourful output..

However you can customize the behaviour of the tool according to your needs by specifying some more options:

-i INTERFACE, –interface INTERFACE #This will return the statistics for the iface provided instead of all ifaces.

-t TIMEOUT, –timeout TIMEOUT #This will set the timeout to the provided value instead of 1s.

-d, –disable-colors #Disable colored output “enabled by default”

-s, –single-output #Print the output single time and exit

The tool is stable, you can rely on it..

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

 

ifinfo | Simple Python3 script to retrieve the network interface information in user friendly output.

If you are old sysadmin -like me- then you are familiar with “ifconfig” output,

but since “ifconfig” now is obsolete, so you’ve to stop using it, and rely on the stuff from ” iproute2″ package,

From my point of view “ifconfig” out put is more user-friendly than “iproute2”, so I’ve created “ifinfo” to generate a fancy & user-friendly output based on “ip addr show” + some text processing to produce this fancy & colourful output:

ifinfo

You can install it by doing the following steps:

wget https://raw.githubusercontent.com/mahmoudadel2/ifinfo/master/ifinfo -O /usr/local/bin/ifinfo

chmod +x /usr/local/bin/ifinfo

If you liked it star it on GitHub 😉