Skip to main content

A COVID19 India CLI package

Project description

Upload Python Package

covcli — Covid India CLI


COVIN-CLI

The Corona pandemic is on everyone's mind. There are many shiny GUI's available to visualize the COVID19-India Data. Thanks to all of them.

On other note " I know nothing about epidemiology."

The data source for my tool is https://api.covid19india.org/. A big shout out to all the developers for there amazing dedication and bring us the formated data and GUI.

COVIN-CLI

A CLI written in Python3 to get the Covid19-India data.

Prerequisite

  • You need nothing more than a basic installation of Python 3 or newer and time to work on it.
  • Virtualenv

Goal

An attempt to create a 1st COVID-19 India CLI.

Currently tool support 7 subcommands

 - country
 - district
 - state
 - state-cases
 - district-cases
 - states-name
 - districts-name

Note:

 - The CLI is still WIP and the arguments may change over the period of time.
 - This is a  project for me.
 - I am not Python expert. The code might not be well organised or upto mark as of now.
   But I will definitely try to make it upto mark.

Run CLI

Country(country)

Command country accepts 1 flag

  • active / confirmed / recovered / deceased
python3 covin-cli.py country -a confirmed
Total confirmed cases in India are : 19288819

python3 covin-cli.py country -a active
Total active cases in India are : 3321542

python3 covin-cli.py country -a recovered
Total recovered cases in India are : 15746000

python3 covin-cli.py country -a deceased
Total deceased cases in India are : 212497

State(state)

Command state accepts 2 flags

  • statename
  • active / confirmed / deceased / recovered

Note:- To get Indian States and Union Territories names please refer below Wiki

Indian State and Union Territories

or you can run a CLI itself to get Indian States and Union Territories names

python3 covin-cli.py states-name
India's States and Union Territories Names are:
------------------------------------------------------------
Total States and Union Territories count in India is: 37

['Andaman and Nicobar Islands', 'Andhra Pradesh', 'Arunachal Pradesh', 'Assam', 'Bihar', 'Chandigarh', 'Chhattisgarh', 'Delhi', 'Dadra and Nagar Haveli and Daman and Diu', 'Goa', 'Gujarat', 'Himachal Pradesh', 'Haryana', 'Jharkhand', 'Jammu and Kashmir', 'Karnataka', 'Kerala', 'Ladakh', 'Lakshadweep', 'Maharashtra', 'Meghalaya', 'Manipur', 'Madhya Pradesh', 'Mizoram', 'Nagaland', 'Odisha', 'Punjab', 'Puducherry', 'Rajasthan', 'Sikkim', 'Telangana', 'Tamil Nadu', 'Tripura', 'Uttar Pradesh', 'Uttarakhand', 'West Bengal']

python3 covin-cli.py state 'Madhya Pradesh' -a confirmed
Total confirmed cases in Madhya Pradesh are: 563327

python3 covin-cli.py state 'Madhya Pradesh' -a active
Total active cases in Madhya Pradesh are: 90796

python3 covin-cli.py state 'Madhya Pradesh' -a recovered
Total recovered cases in Madhya Pradesh are: 466915

python3 covin-cli.py state 'Madhya Pradesh' -a deceased
Total deceased cases in Madhya Pradesh are: 5616

District(district)

Command district accepts 3 flags

  • statename
  • ditrictname
  • active / confirmed / deceased / recovered

Note:- To get Indian States and Union Territories names and respective districts please refer below Wiki

Indian States and Union Territories and respective districts

or you can CLI itself to get the districts in a state

python3 covin-cli.py districts-name 'Madhya Pradesh'
State Madhya Pradesh districts names are:
------------------------------------------------------------
['Agar Malwa', 'Alirajpur', 'Anuppur', 'Ashoknagar', 'Balaghat', 'Barwani', 'Betul', 'Bhind', 'Bhopal', 'Burhanpur', 'Chhatarpur', 'Chhindwara', 'Damoh', 'Datia', 'Dewas', 'Dhar', 'Dindori', 'Guna', 'Gwalior', 'Harda', 'Hoshangabad', 'Indore', 'Jabalpur', 'Jhabua', 'Katni', 'Khandwa', 'Khargone', 'Mandla', 'Mandsaur', 'Morena', 'Narsinghpur', 'Neemuch', 'Niwari', 'Other Region', 'Panna', 'Raisen', 'Rajgarh', 'Ratlam', 'Rewa', 'Sagar', 'Satna', 'Sehore', 'Seoni', 'Shahdol', 'Shajapur', 'Sheopur', 'Shivpuri', 'Sidhi', 'Singrauli', 'Tikamgarh', 'Ujjain', 'Umaria', 'Vidisha']
python3 covin-cli.py district 'Madhya Pradesh' 'Indore' -a active
active cases in district Indore are: 12278

python3 covin-cli.py district 'Madhya Pradesh' 'Indore' -a confirmed
confirmed cases in district Indore are: 110840

python3 covin-cli.py district 'Madhya Pradesh' 'Indore' -a recovered
recovered cases in district Indore are: 97423

python3 covin-cli.py district 'Madhya Pradesh' 'Indore' -a deceased
deceased cases in district Indore are: 1139

District Cases(districts-cases)

Command district-cases accepts 2 flags

  • statename
  • active / confirmed / deceased / recovered
python3 covin-cli.py districts-cases 'Madhya Pradesh' -a active
active cases in district Agar Malwa are: 384
active cases in district Alirajpur are: 472
active cases in district Anuppur are: 838
active cases in district Ashoknagar are: 707
active cases in district Balaghat are: 1156
active cases in district Barwani are: 767
active cases in district Betul are: 1809
active cases in district Bhind are: 282
active cases in district Bhopal are: 12955
active cases in district Burhanpur are: 164
active cases in district Chhatarpur are: 609

State Cases(state-cases)

Command state-cases accepts 1 flag

  • statename
python3 covin-cli.py state-cases 'Madhya Pradesh'
------------------------------------------------------------
Covid19 information for district Agar Malwa
------------------------------------------------------------
notes 

active 384

confirmed 2241

migratedother 0

deceased 23

recovered 1834

delta {'confirmed': 0, 'deceased': 0, 'recovered': 0}

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

covin-cli-2.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

covin_cli-2.0-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

File details

Details for the file covin-cli-2.0.tar.gz.

File metadata

  • Download URL: covin-cli-2.0.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for covin-cli-2.0.tar.gz
Algorithm Hash digest
SHA256 2e743ecb21d79fe2cf7f674e7de28332b3c29e540de364b283a535198076c669
MD5 92a5db10032accd07297b884df50dbed
BLAKE2b-256 11e42e240e073f713f0b4d857fa3a55097d0dd38f9febbb51df3a8f4fa4bd014

See more details on using hashes here.

File details

Details for the file covin_cli-2.0-py3-none-any.whl.

File metadata

  • Download URL: covin_cli-2.0-py3-none-any.whl
  • Upload date:
  • Size: 17.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4

File hashes

Hashes for covin_cli-2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b5add6cbe4c56e5d7e43d83dfc99fbdd1ef68d975c4833a417c06c238a3520bc
MD5 6a0d755c41b84cf82cdd230af08b8666
BLAKE2b-256 dfef882394c8dc1088cb1dba36e6d8580d0bcaf6d7c844b70d8d87421bccf6fe

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