Home

Awesome

<h4 align="center"> <a href="https://github.com/MouadBH/coronapy-cli"> <img src="https://github.com/MouadBH/coronapy-cli/raw/master/.github/corona.png" alt="coronapy-cli" /> </a> <br> <br> A command line tool to fetch worldwide data about COVID-19. <br>

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

<br> Stay Home, Stay Safe. </h4>

coronapy-cli

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

Data Source

Install

pip install coronapy-cli

πŸ“Ÿ

Project Structure

β”œβ”€β”€β”€.github
β”œβ”€β”€β”€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

# limit the number of results to the specified value.
coronapy countries --limit 5  

# Alias: limit the number of results .
coronapy countries -l 5

πŸ“Ÿ

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

Issues

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!

Contributing

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

Contributors list

<table> <tr> <td align="center"><a href="https://github.com/MouadBH"><img src="https://avatars.githubusercontent.com/u/28781942?v=3" width="100px;" alt=""/><br /><sub><b>Mouad Boulahdoud</b></sub></a></td> <td align="center"><a href="https://github.com/mlisovyi"><img src="https://avatars.githubusercontent.com/u/10157590?v=3" width="100px;" alt=""/><br /><sub><b>Misha Lisovyi</b></sub></a></td> <td align="center"><a href="https://github.com/aymaneMx"><img src="https://avatars2.githubusercontent.com/u/30264095?v=4" width="100px;" alt=""/><br /><sub><b>aymaneMx </b></sub></td> <td align="center"><a href="https://github.com/MouadZIANI"><img src="https://avatars2.githubusercontent.com/u/29683939?v=4" width="100px;" alt=""/><br /><sub><b>Mouad ZIANI </b></sub></td> <td align="center"><a href="https://github.com/amitay87"><img src="https://avatars2.githubusercontent.com/u/4787598?v=4" width="100px;" alt=""/><br /><sub><b>Amitay </b></sub></td> <td align="center"><a href="https://github.com/y1n0"><img src="https://avatars2.githubusercontent.com/u/8240619?v=4" width="100px;" alt=""/><br /><sub><b>kudos </b></sub></td> <td align="center"><a href="https://github.com/OkiStuff"><img src="https://avatars2.githubusercontent.com/u/40648091?v=4" width="100px;" alt=""/><br /><sub><b>OkiStuff </b></sub></td> <td align="center"><a href="https://github.com/DarkCode01"><img src="https://avatars2.githubusercontent.com/u/23442814?v=4" width="100px;" alt=""/><br /><sub><b>Jose M. Segura Polanco </b></sub></td> </tr> <tr> <td align="center"><a href="https://github.com/yezz123"><img src="https://avatars2.githubusercontent.com/u/52716203?v=4" width="100px;" alt=""/><br /><sub><b>Yasser Tahiri</b></sub></td> </tr> </table>

Authors

License

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

Sponsor

This project sponsored by tea πŸ₯ƒ.