Skip to main content

A command line tool to fetch worldwide data about Corona Virus

Project description

coronapy-cli

A command line tool to fetch worldwide data about COVID-19.

MIT License PR's Welcome Python Versions PyPi Version Alt PyPi Downloads Open Source


Stay Home, Stay Safe.

coronapy-cli

Track the Coronavirus disease (COVID-19) in the command line.

  • 🚀 Get worldwide Coronavirus disease (COVID-19) reporting
  • 🤯 Active daily reporting of your country's COVID-19 statistics
  • 🗃️ Data: Country, Cases, Deaths, Recovered, Active, Critical
  • 🥃 Soon : Get Mroccan States data for Coronavirus disease reports

coronapy-cli

Install

pip install coronapy-cli

Project Structure

├───coronapy
│    ├───lib
│       ├───__init.py__
│       ├───color.py
│       ├───get_countries.py
│       ├───get_country.py
│       └───get_world_wide.py
│    ├───__init__.py
│    └───cli.py
├───.gitignore
├───LICENSE.txt
├───Pipfile
├───Pipfile.lock
├───READMR.md
├───setup.cfg
└───setup.py

Development

Setup

  1. Clone the repo and cd into it.

  2. Set up a Python 3 virtual environment using pipenv:

    pipenv --three         # create Python 3 virtual environment
    pipenv install --dev   # install all dependencies
    pipenv shell           # activate virtual environment shell
    
  3. The script can be run from the root directory of the project:

    python3 -m coronapy.cli --help
    

Usage

Worldwide Information

# Display data for all total cases, recovery, and deaths.
coronapy all

# Display a chart of Total Cases, Total Deaths and Recovered Cases.
coronapy all --chart

# Alias: Display  a char.
coronapy all -c

All Countries

# Display data for all countries.
coronapy countries

# Sort data by type, the default type is 'cases'.
coronapy countries --sort cases

# Alias: Sort data by type.
corcoronapyona countries -s recovered

Single Country

# Display data for given country.
coronapy country <country_name>

# Display a chart of Total Cases, Total Deaths and Recovered Cases for given country i.e. China.
coronapy country China --chart

# Alias: Display  a char.
coronapy country China -c

# Display a histogram shows cases or deaths data in last 20 day for given country i.e. USA.
coronapy country usa --hist

# You can set what kind of data (cases or deaths), the default is 'cases'.
coronapy country usa --hist --type cases
coronapy country usa --hist --type deaths

# Alias: Histogram & data type.
coronapy country usa -h -t cases

Sort Data

# All sorting parameters.
coronapy countries -s country
coronapy countries -s cases
coronapy countries -s todayCases
coronapy countries -s deaths
coronapy countries -s todayDeaths
coronapy countries -s recovered
coronapy countries -s active
coronapy countries -s critical

CLI Help

# Display the help data.
coronapy --help

To Do

  • Add Screenshots.
  • Catch and handle exceptions.
  • Add Mroccan States data for Coronavirus disease reports.
  • Add US States data for Coronavirus disease reports.
  • Testing code.
  • Make --help command better.
  • More Code Refactor!
  • More... (have suggestions? let me know!)

Issues

Contributions are welcome, create a pull request to this repo and I will review your code.

Contributing

If you're facing a problem in using coronapy-cli please let me know by creating an issue in this github repository. I'm happy to help you! Don't forget to provide some screenshot or error logs of it!

Contributors list


Mouad Boulahdoud

Misha Lisovyi

aymaneMx

Authors

  • MouadBH

License

This project is licensed under the MIT License - see the LICENSE.txt file for details

Sponsor

This project sponsored by tea 🥃.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coronapy-cli-1.3.0.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

coronapy_cli-1.3.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

Details for the file coronapy-cli-1.3.0.tar.gz.

File metadata

  • Download URL: coronapy-cli-1.3.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for coronapy-cli-1.3.0.tar.gz
Algorithm Hash digest
SHA256 742ff5473bb4be1bc8692dfaa2b67f8bfd30a5093234e7302ab698ff082dc43c
MD5 3203fc58f8540fdd80fb1b6529916388
BLAKE2b-256 325ee954d50fd0752aac4aad3461e1c73524cb44ab585d5f008cf2836e66c7df

See more details on using hashes here.

File details

Details for the file coronapy_cli-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: coronapy_cli-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

File hashes

Hashes for coronapy_cli-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dc8799ca0a3e99eeb1c9b634379e72d9afbbb29112ee6f4489f0353b2386196c
MD5 b1b28fe38cb19caf97a4cf714263c048
BLAKE2b-256 c43d4df67a804bfd19a1e142ec318ab8f5461c7d76be6567d9834c3a45ea5175

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page