covid
Python package to fetch information regarding the novel corona virus provided by Johns Hopkins university and worldometers.info
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (10.7%) to scientific vocabulary
Keywords
Repository
Python package to fetch information regarding the novel corona virus provided by Johns Hopkins university and worldometers.info
Basic Info
- Host: GitHub
- Owner: nf1s
- License: mit
- Language: Python
- Default Branch: master
- Homepage: https://ahmednafies.github.io/covid/
- Size: 3.6 MB
Statistics
- Stars: 42
- Watchers: 2
- Forks: 25
- Open Issues: 3
- Releases: 12
Topics
Metadata Files
README.md
Covid
Description
Python package to get information regarding the novel corona virus provided by Johns Hopkins university and worldometers.info
Full Documentation can be found here

Requirements
python >= 3.10
How to install
pip install covid
Dependencies
pydantic
requests
How to use
Getting data from Worldometers.info (default)

python
covid = Covid()
Get Data
python
covid.get_data()
Result
```python [ { 'country': 'USA', 'confirmed': 311637, 'newcases': 280, 'deaths': 8454, 'recovered': 14828, 'active': 288355, 'critical': 8206, 'newdeaths': 2, 'totaltests': 1656897, 'totaltestspermillion': Decimal('0'), 'totalcasespermillion': Decimal('941'), 'totaldeathspermillion': Decimal('26') }, { 'active': 1376, 'confirmed': 81669, 'country': 'China', 'critical': 295, 'deaths': 3329, 'newcases': 30, 'newdeaths': 3, 'recovered': 76964, 'totalcasespermillion': Decimal('57'), 'totaldeathspermillion': Decimal('2'), 'totaltests': 0, 'totaltestspermillion': Decimal('0') } ... ]
```
Get Status By Country Name
python
covid.get_status_by_country_name("italy")
Result
python
{
'active': 88274,
'confirmed': 124632,
'country': 'Italy',
'critical': 3994,
'deaths': 15362,
'new_cases': 0,
'new_deaths': 0,
'recovered': 20996,
'total_cases_per_million': Decimal('2061'),
'total_deaths_per_million': Decimal('254'),
'total_tests': 657224,
'total_tests_per_million': Decimal('0')
}
List Countries
python
countries = covid.list_countries()
Result
python
[
'china',
'italy',
'usa',
'spain',
'germany',
...
]
Get Total Active cases
python
active = covid.get_total_active_cases()
Get Total Confirmed cases
python
confirmed = covid.get_total_confirmed_cases()
Get Total Recovered cases
python
recovered = covid.get_total_recovered()
Get Total Deaths
python
deaths = covid.get_total_deaths()
CLI 2.0 (New)
bash
covid --help
Get all data
Worldometers source (default)
bash
covid
or
bash
covid -s worldometers
John Hopkins source (deprecated)
bash
covid -s john_hopkins
List Countries
This comes in handy when you need to know the available names of countries
when using covid -s 'source' -c 'country_name', eg. "The Republic of Moldova" or just "Moldova"
So use this when you need to know the country exact name that you can use.
bash
covid -s worldometers --list-countries
Get Status By Country Name
bash
covid -s worldometers -c sweden
Get Total Active cases
bash
covid -s worldometers -o active
Get Total Confirmed cases
bash
covid -s worldometers -o confirmed
Get Total Recovered cases
bash
covid -s worldometers -o recovered
Get Total Deaths
bash
covid -s worldometers -o deaths
John Hopkins University API (Deprecated)

Get All Data
```python from covid import Covid
covid = Covid() covid.get_data() ```
Result
python
[
{
'id': '53',
'country': 'China',
'confirmed': 81020,
'active': 9960,
'deaths': 3217,
'recovered': 67843,
'latitude': 30.5928,
'longitude': 114.3055,
'last_update': 1584097775000
},
{
'id': '115',
'country': 'Italy',
'confirmed': 24747,
'active': 20603,
'deaths': 1809,
'recovered': 2335,
'latitude': 41.8719,
'longitude': 12.5674,
'last_update': 1584318130000
},
...
]
List Countries
This comes in handy when you need to know the available names of countries
when using get_status_by_country_name, eg. "The Republic of Moldova" or just "Moldova"
So use this when you need to know the country exact name that you can use.
python
countries = covid.list_countries()
Result
python
[
{'id': '53', 'country': 'China'},
{'id': '115', 'country': 'Italy'}
...
]
Get Status By Country ID
python
italy_cases = covid.get_status_by_country_id(115)
Result
python
{
'id': '115',
'country': 'Italy',
'confirmed': 24747,
'active': 20603,
'deaths': 1809,
'recovered': 2335,
'latitude': 41.8719,
'longitude': 12.5674,
'last_update': 1584318130000
}
Get Status By Country Name
python
italy_cases = covid.get_status_by_country_name("italy")
Result
python
{
'id': '115',
'country': 'Italy',
'confirmed': 24747,
'active': 20603,
'deaths': 1809,
'recovered': 2335,
'latitude': 41.8719,
'longitude': 12.5674,
'last_update': 1584318130000
}
Get Total Confirmed cases
python
confirmed = covid.get_total_confirmed_cases()
Get Total Deaths
python
deaths = covid.get_total_deaths()
Owner
- Name: NF1S
- Login: nf1s
- Kind: user
- Repositories: 23
- Profile: https://github.com/nf1s
I am an IT veteran with focus on software development for web applications
GitHub Events
Total
- Delete event: 1
- Issue comment event: 4
- Pull request event: 4
- Create event: 3
Last Year
- Delete event: 1
- Issue comment event: 4
- Pull request event: 4
- Create event: 3
Committers
Last synced: 9 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| ahmednafies | a****s@g****m | 204 |
| Ahmed | a****d@A****l | 44 |
| Saumil Shah | 6****l | 3 |
| Nikolay Kitanov | n****v@g****m | 1 |
Issues and Pull Requests
Last synced: 6 months ago
All Time
- Total issues: 19
- Total pull requests: 59
- Average time to close issues: 26 days
- Average time to close pull requests: 30 days
- Total issue authors: 18
- Total pull request authors: 5
- Average comments per issue: 3.42
- Average comments per pull request: 0.54
- Merged pull requests: 47
- Bot issues: 0
- Bot pull requests: 9
Past Year
- Issues: 0
- Pull requests: 6
- Average time to close issues: N/A
- Average time to close pull requests: about 2 months
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 1.0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 6
Top Authors
Issue Authors
- AvinashReddy3108 (2)
- bistcuite (1)
- iobreaker (1)
- nf1s (1)
- dlhxr (1)
- amritoit (1)
- hellosaumil (1)
- LonelyGuy12 (1)
- nuertey (1)
- glennmichaelmejias (1)
- nkitanov (1)
- mprender (1)
- kwccoin (1)
- derekhsu (1)
- YoursSarcastically (1)
Pull Request Authors
- nf1s (48)
- dependabot[bot] (11)
- LoniasGR (2)
- nkitanov (2)
- hellosaumil (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 2
-
Total downloads:
- pypi 5,453 last-month
- Total docker downloads: 426
-
Total dependent packages: 0
(may contain duplicates) -
Total dependent repositories: 815
(may contain duplicates) - Total versions: 111
- Total maintainers: 1
pypi.org: covid
Python package to get information regarding the novel corona virus provided by Johns Hopkins university and worldometers.info
- Homepage: https://nf1s.github.io/covid/
- Documentation: https://nf1s.github.io/covid/
- License: MIT
-
Latest release: 3.0.0
published over 1 year ago
Rankings
Maintainers (1)
proxy.golang.org: github.com/nf1s/covid
- Documentation: https://pkg.go.dev/github.com/nf1s/covid#section-documentation
- License: mit
-
Latest release: v3.0.0+incompatible
published over 1 year ago
Rankings
Dependencies
- argh * develop
- ipython * develop
- pdbpp * develop
- pygments * develop
- pyyaml * develop
- rich * develop
- beautifulsoup4 *
- bleach >=3.*
- click *
- importlib-metadata *
- inflection *
- jeepney >=0.4.2
- mkdocs *
- mkdocs-material *
- pydantic <2.0.0
- python ^3.10
- requests *
- typer *
- typing-extensions *
- bandit * test
- coverage * test
- flake8 * test
- flake8-black * test
- flake8-isort * test
- mypy * test
- pre-commit * test
- pytest * test
- argh 0.31.3
- asttokens 2.4.1
- attrs 23.2.0
- babel 2.15.0
- bandit 1.7.9
- beautifulsoup4 4.12.3
- black 24.4.2
- bleach 6.1.0
- certifi 2024.7.4
- cfgv 3.4.0
- charset-normalizer 3.3.2
- click 8.1.7
- colorama 0.4.6
- coverage 7.6.0
- decorator 5.1.1
- distlib 0.3.8
- exceptiongroup 1.2.2
- executing 2.0.1
- fancycompleter 0.9.1
- filelock 3.15.4
- flake8 7.1.0
- flake8-black 0.3.6
- flake8-isort 6.1.1
- ghp-import 2.1.0
- identify 2.6.0
- idna 3.7
- importlib-metadata 8.0.0
- inflection 0.5.1
- iniconfig 2.0.0
- ipython 8.26.0
- isort 5.13.2
- jedi 0.19.1
- jeepney 0.8.0
- jinja2 3.1.4
- markdown 3.6
- markdown-it-py 3.0.0
- markupsafe 2.1.5
- matplotlib-inline 0.1.7
- mccabe 0.7.0
- mdurl 0.1.2
- mergedeep 1.3.4
- mkdocs 1.6.0
- mkdocs-get-deps 0.2.0
- mkdocs-material 9.5.29
- mkdocs-material-extensions 1.3.1
- mypy 1.11.0
- mypy-extensions 1.0.0
- nodeenv 1.9.1
- packaging 24.1
- paginate 0.5.6
- parso 0.8.4
- pathspec 0.12.1
- pbr 6.0.0
- pdbpp 0.10.3
- pexpect 4.9.0
- platformdirs 4.2.2
- pluggy 1.5.0
- pre-commit 3.7.1
- prompt-toolkit 3.0.47
- ptyprocess 0.7.0
- pure-eval 0.2.2
- pycodestyle 2.12.0
- pydantic 1.10.17
- pyflakes 3.2.0
- pygments 2.18.0
- pymdown-extensions 10.8.1
- pyreadline 2.1
- pyrepl 0.9.0
- pytest 8.2.2
- python-dateutil 2.9.0.post0
- pyyaml 6.0.1
- pyyaml-env-tag 0.1
- regex 2024.5.15
- requests 2.32.3
- rich 13.7.1
- shellingham 1.5.4
- six 1.16.0
- soupsieve 2.5
- stack-data 0.6.3
- stevedore 5.2.0
- tomli 2.0.1
- traitlets 5.14.3
- typer 0.12.3
- typing-extensions 4.12.2
- urllib3 2.2.2
- virtualenv 20.26.3
- watchdog 4.0.1
- wcwidth 0.2.13
- webencodings 0.5.1
- wmctrl 0.5
- zipp 3.19.2