Giter VIP home page Giter VIP logo

covid19-webservice's Introduction

covid19-webservice

Simple Python webservice to provide the latest statistics about Coronavirus COVID-19 in JSON format.

Running local/dev

Prerequisites

pip install -r requirements.txt

Start the webservice

python -m covid19_webservice

Running on production

Build an image

docker build -t covid19-webservice .

Run the container

docker run -d --name covid19-webservice -p 8080:8080 covid19-webservice

Usage

I've listed the available endpoints in the webservice home page, e.g. http://localhost:8080/

Examples

Getting a country by name (German):

curl http://localhost:8080/get/country/name/Ägypten
{
    "confirmed": 49, 
    "deaths": 1, 
    "lat": 26.0, 
    "lon": 30.0, 
    "recovered": 1, 
    "updated": "2020-03-08 19:03:11"
}

Getting a city by name (German):

curl http://localhost:8080/get/city/name/Deutschland/Bayern
{
    "confirmed": 200, 
    "deaths": 0, 
    "lat": 48.768814, 
    "lon": 11.658164999999999, 
    "recovered": 14, 
    "updated": "2020-03-08 17:00:00"
}

covid19-webservice's People

Contributors

mahmoudadel2 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

nisabek

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.