Covid19 API. (Currently Scrapes: worldometers)

Overview

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.

Comments
  • Add docker-compose.yml for hosting and reverse proxying with Traefik

    Add docker-compose.yml for hosting and reverse proxying with Traefik

    Add a docker-compose.yml for hosting with docker and reverse proxying via Traefik. You can follow this guide for hosting Traefik and running a sample application: https://fossian.com/self-host-ghost-blog-mysql-traefik/

    hacktoberfest 
    opened by AmreshSinha 2
  • Add CODE_OF_CONDUCT

    Add CODE_OF_CONDUCT

    Currently, the repository does not have any code of conduct. You can take references from anywhere. Examples: https://github.com/AmreshSinha/Spotify-Cards-API/blob/master/CODE_OF_CONDUCT.md

    good first issue hacktoberfest 
    opened by AmreshSinha 1
  • Add CONTRIBUTING.md

    Add CONTRIBUTING.md

    Is your feature request related to a problem? Please describe. Currently, there are no CONTRIBUTING guidelines for newcomers.

    Describe the solution you'd like Add a CONTRIBUTING.md file listing all the rules and guidelines which should be followed while contributing to the repo.

    Anything extra you want to add? Make sure it at least follows the general rules of creating a new branch and how to name PRs.

    References You are free to see any references and examples. Just don't copy them straightforwardly. Some examples: https://github.com/AmreshSinha/sshot/blob/main/CONTRIBUTING.md https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md https://reactjs.org/docs/how-to-contribute.html https://github.com/vercel/next.js/blob/canary/contributing.md

    good first issue hacktoberfest 
    opened by AmreshSinha 1
  • Fix dockerfile permission denied, unrecognized packages and python not found

    Fix dockerfile permission denied, unrecognized packages and python not found

    With current Dockerfile, I wasn't able to properly run the program. I got these errors:

    • Permission denied
    • Unrecognized packages
    • Python not found (after fixing permission denied)

    So that I want to fix this by creating PR, is that okay ?


    For more context

    ❯ docker container run --name covid19-api-web -p 80:80 covid19-api:1.0
    /bin/sh: 1: ./app/run.sh: Permission denied
    

    Then after fixing the Permission denied error, got other error:

    ❯ docker container run --name covid19-api-web -p 80:80 covid19-api:1.0
    ./app/run.sh: 1: ./app/run.sh: python: not found
    ./app/run.sh: 2: ./app/run.sh: python: not found
    

    And after fixing python: not found, got other error:

    ❯ docker container run --name covid19-api-web -p 80:80 covid19-api:1.0
    Traceback (most recent call last):
      File "/app/scraper/scraper.py", line 1, in <module>
        import requests
    ModuleNotFoundError: No module named 'requests'
    Traceback (most recent call last):
      File "/app/waitress_server.py", line 1, in <module>
        from waitress import serve
    ModuleNotFoundError: No module named 'waitress'
    
    opened by okzapradhana 0
  • Exclude warnings library from requirements.txt

    Exclude warnings library from requirements.txt

    When executing pip install -r requirements.txt an error raised like this:

    ❯ pip install -r requirements.txt
    Collecting wheel
      Downloading wheel-0.37.1-py2.py3-none-any.whl (35 kB)
    Collecting Flask
      Using cached Flask-2.2.2-py3-none-any.whl (101 kB)
    Collecting pandas
      Using cached pandas-1.5.0-cp39-cp39-macosx_11_0_arm64.whl (10.9 MB)
    Collecting requests
      Using cached requests-2.28.1-py3-none-any.whl (62 kB)
    Collecting numpy
      Downloading numpy-1.23.3-cp39-cp39-macosx_11_0_arm64.whl (13.4 MB)
         |████████████████████████████████| 13.4 MB 3.8 MB/s 
    Collecting beautifulsoup4
      Downloading beautifulsoup4-4.11.1-py3-none-any.whl (128 kB)
         |████████████████████████████████| 128 kB 5.5 MB/s 
    Collecting lxml
      Downloading lxml-4.9.1.tar.gz (3.4 MB)
         |████████████████████████████████| 3.4 MB 9.2 MB/s 
    ERROR: Could not find a version that satisfies the requirement warnings (from versions: none)
    ERROR: No matching distribution found for warnings
    

    And found out that warnings is already a built in package in Python. Can I make a PR to fix this ?

    bug hacktoberfest 
    opened by okzapradhana 3
Owner
Amresh Prasad Sinha
Busy in Discovering myself :)
Amresh Prasad Sinha
A simple waybar module to display the status of the ICE you are currently in using the ICE Portals JSON API.

waybar-iceportal A simple waybar module to display the status of the ICE you are currently in using the ICE Portals JSON API. Installation Ensure pyth

Moritz 7 Aug 26, 2022
Scrapes an instagram user's photos and videos

Instagram Scraper instagram-scraper is a command-line application written in Python that scrapes and downloads an instagram user's photos and videos.

null 7.3k Nov 18, 2022
scrapes medias, likes, followers, tags and all metadata. Inspired by instagram-php-scraper,bot

instagram_scraper This is a minimalistic Instagram scraper written in Python. It can fetch media, accounts, videos, comments etc. `Comment` and `Like`

sirjoe 2.5k Nov 16, 2022
A Telegram bot that scrapes websites for available vaccination appointments to notify users. (German)

@dachau_impf_bot ???? A Telegram bot to check the contents of https://termin.dachau-med.de for available slots and inform users of the available dates

null 1 Nov 21, 2021
A python bot that scrapes free udemy coupons and sends them to Telegram.

About: A python telegram bot that scrapes information about fresh free Udemy coupons content from couponscorpion.com and sends it to teleram channel h

Irina Gayday 1 Dec 19, 2021
Changes the Telegram bio, profile picture, first and last name to the song that the user is currently listening to.

TGBIOFY - Telegram & Spotify integration Changes the Telegram bio, profile picture, first and last name to the song that the user is currently listeni

elpideus 26 Dec 7, 2022
This is a simple bot that can be used to upload images to a third-party cloud (image hosting). Currently, only the imgbb.com website supports the bot. I Will do future updates

TGImageHosting This is a simple bot that can be used to upload images to a third party cloud (image hosting). Currently, only the imgbb.com website su

Abhijith N T 0 Dec 26, 2021
Official python API for Phish.AI public and private API to detect zero-day phishing websites

phish-ai-api Summary Official python API for Phish.AI public and private API to detect zero-day phishing websites How it Works (TLDR) Essentially we h

Phish.AI 168 May 17, 2022
PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.

PRAW: The Python Reddit API Wrapper PRAW, an acronym for "Python Reddit API Wrapper", is a Python package that allows for simple access to Reddit's AP

Python Reddit API Wrapper Development 3k Dec 29, 2022
Python API wrapper around Trello's API

A wrapper around the Trello API written in Python. Each Trello object is represented by a corresponding Python object. The attributes of these objects

Richard Kolkovich 904 Jan 2, 2023
PRAW, an acronym for "Python Reddit API Wrapper", is a python package that allows for simple access to Reddit's API.

PRAW: The Python Reddit API Wrapper PRAW, an acronym for "Python Reddit API Wrapper", is a Python package that allows for simple access to Reddit's AP

Python Reddit API Wrapper Development 3k Dec 29, 2022
alpaca-trade-api-python is a python library for the Alpaca Commission Free Trading API.

alpaca-trade-api-python is a python library for the Alpaca Commission Free Trading API. It allows rapid trading algo development easily, with support for both REST and streaming data interfaces

Alpaca 1.5k Jan 9, 2023
Telegram PHub Bot using ARQ Api and Pyrogram. This Bot can Download and Send PHub HQ videos in Telegram using ARQ API.

Tg_PHub_Bot Telegram PHub Bot using ARQ Api and Pyrogram. This Bot can Download and Send PHub HQ videos in Telegram using ARQ API. OS Support All linu

TheProgrammerCat 13 Oct 21, 2022
A python to scratch API connector. Can fetch data from the API and send it back in cloud variables.

Scratch2py Scratch2py or S2py is a easy to use, versatile tool to communicate with the Scratch API Based of scratchclient by Raihan142857 Installation

null 20 Jun 18, 2022
An API wrapper around the pythonanywhere's API.

pyaww An API wrapper around the pythonanywhere's API. The name stands for pythonanywherewrapper. 100% api coverage most of the codebase is documented

null 7 Dec 11, 2022
The Bot provide Hadith API and fetch content via api.hadith.sutanlab.id

Bot Hadith-API on Telegram The Bot provide Hadith API and fetch content via api.hadith.sutanlab.id Built With Python Asynchronous HTTP protocol client

xMan 12 Feb 19, 2022
Async ready API wrapper for Revolt API written in Python.

Mutiny Async ready API wrapper for Revolt API written in Python. Installation Python 3.9 or higher is required To install the library, you can just ru

null 16 Mar 29, 2022
🚀 An asynchronous python API wrapper meant to replace discord.py - Snappy discord api wrapper written with aiohttp & websockets

Pincer An asynchronous python API wrapper meant to replace discord.py ❗ The package is currently within the planning phase ?? Links |Join the discord

Pincer 125 Dec 26, 2022