Giter Site home page Giter Site logo

covid19-api's Introduction

Covid19-API

Python Flask

An opensource Covid19 API (currently uses worldometer only)

Output

Examples

  • Covid19 Every Country Data

    • Request URL
      <your-ip>/api/all
      
    • Response
  • Covid19 WorldWide Summarised Data

    • Request URL
      <your-ip>/api/world
      
    • Response
  • Covid19 India Data

    • Request URL

      <your-ip>/api/country?req=ind
      

      or

      <your-ip>/api/country?req=in
      
    • Response

Usage

On VPS (Unix Based Systems)

Without Docker

  1. Clone the Repository
    • git clone https://github.com/AmreshSinha/Covid19-API
  2. Install dependencies
    • pip install -r requirements.txt
  3. Run scraper.py
    • python scraper/scraper.py
    • Note: The Scraper has a time interval of 1 hour by default
  4. Run Flask App with Gunicorn or Waitress
    • Like for waitress the waitress_server.py is there
    • python waitress_server.py
  5. If you want to host for web then update your rules in nginx accordingly and get one ssl certificate

With Docker

  1. Clone the Repository
    • git clone https://github.com/AmreshSinha/Covid19-API
  2. Build Docker Image
    • docker build -t covid19-api:1.0 .
  3. Run Container
    • docker container run --name covid19-api-web -p 80:80 covid19-api:1.0
    • The container will start running with PORT 80 exposed to Public.
  4. To Stop the Container
    • docker container stop covid19-api-web

Contribution

There is a lot of work still remaining. Some of which:

  1. Adding more sources
  2. Cleaning Data
  3. Adding provinces covid data under their parent country.
  4. Making our own pycountry module fork according to our needs.

For Extra features (other than the above) you want to contribute, open an issue first.

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.