Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MouadBH/coronapy-cli
A command line tool in python to fetch worldwide data about COVID-19
https://github.com/MouadBH/coronapy-cli
corona coronavirus coronavirus-info coronavirus-real-time coronavirus-tracking covid-19
Last synced: 3 months ago
JSON representation
A command line tool in python to fetch worldwide data about COVID-19
- Host: GitHub
- URL: https://github.com/MouadBH/coronapy-cli
- Owner: MouadBH
- License: mit
- Created: 2020-03-27T22:05:51.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-12-08T10:56:35.000Z (almost 2 years ago)
- Last Synced: 2024-07-03T09:09:28.693Z (4 months ago)
- Topics: corona, coronavirus, coronavirus-info, coronavirus-real-time, coronavirus-tracking, covid-19
- Language: Python
- Homepage:
- Size: 1.77 MB
- Stars: 46
- Watchers: 7
- Forks: 9
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE.txt
Awesome Lists containing this project
- awesome-morocco - coronapy-cli - cli.svg?style=social)](https://github.com/MouadBH/coronapy-cli/stargazers) - A command line tool in python to fetch worldwide data about COVID-19. by [@MouadBH](https://github.com/MouadBH) (Uncategorized / Uncategorized)
README
A command line tool to fetch worldwide data about COVID-19.
[![MIT License](https://img.shields.io/github/license/MouadBH/coronapy-cli?style=flat)](https://github.com/MouadBH/coronapy-cli/blob/master/LICENSE.txt) [![PR's Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat)](http://makeapullrequest.com) [![Python Versions](https://img.shields.io/pypi/pyversions/coronapy-cli.svg)](https://pypi.python.org/pypi/coronapy-cli/) [![PyPi Version Alt](https://badge.fury.io/py/coronapy-cli.svg)](https://pypi.python.org/pypi/coronapy-cli/) [![PyPi Downloads](https://pepy.tech/badge/coronapy-cli)](http://pepy.tech/project/coronapy-cli) [![Open Source](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](https://opensource.org/)
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## Data Source
- [NovelCOVID/API](https://github.com/NovelCOVID/API/) updated very frequently.## Install
```sh
pip install coronapy-cli```
[![π](./.github/install.gif)](./../../)
## Project Structure
```sh
ββββ.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](https://docs.pipenv.org):
```bash
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:
```bash
python3 -m coronapy.cli --help
```## Usage
### Worldwide Information
```sh
# 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
```[![π](./.github/all.gif)](./../../)
### All Countries
```sh
# 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
```[![π](./.github/countries.gif)](./../../)
### Single Country
```sh
# Display data for given country.
coronapy country# 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
```[![π](./.github/country.gif)](./../../)
### Sort Data
```sh
# 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
```[![π](./.github/sort.gif)](./../../)
#### CLI Help
```sh
# Display the help data.
coronapy --help
```## To Do
- ~~Add Screenshots.~~
- ~~Catch and handle exceptions.~~ (Complete)
- ~~Make ```--help``` command better.~~
- Add Mroccan States data for Coronavirus disease reports.
- Add US States data for Coronavirus disease reports.
- Testing code.
- More Code Refactor!
- More... (have suggestions? let me know!)## 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
Mouad Boulahdoud
Misha Lisovyi
aymaneMx
Mouad ZIANI
Amitay
kudos
OkiStuff
Jose M. Segura Polanco
Yasser Tahiri
## Authors
* **MouadBH**
## License
This project is licensed under the MIT License - see the [LICENSE.txt](LICENSE.txt) file for details
### Sponsor
This project sponsored by tea π₯.