Skip to main content

Covid-19 api wrote by python, you can get the covid-19 data from China and the world

Project description

Pyeumonia

This program is in beta and open source, if there is some error(s) in your code, please submit an issue to Github.

A covid-19 api to get the latest data from DXY.

Official Website: Official Website

Chinese user can see README-zh_CN.md.

国内用户请访问README-zh_CN.md.

How to install

install pypi package:

pip install pyeumonia

Configurations

If you have already installed pyeumonia, and it's newer than 0.1.0a0, it will automatically check for updates, you can also configure it by following the steps below to let it automatically update.

from pyeumonia import Covid19

covid = Covid19(check_upgradable=True, auto_update=True)

If you don't want to check updates automatically, you can configure like this.

Warning:

  • Don't use it on Jupyter Notebook, it may cause error!
from pyeumonia import Covid19

covid = Covid19(check_upgradable=False)

If you want to upgrade it manually, you can use pip install --upgrade pyeumonia.

Usage

Get the latest data from the world:

from pyeumonia import Covid19

covid = Covid19(language='en_US')
data = covid.world_covid_data()

Get timeline data from your country:

from pyeumonia import Covid19

covid = Covid19(language='en_US')
# Get covid-19 data from your country in the last 30 days
data = covid.country_covid_data(country='auto', show_timeline=30)

Warning:

  • If you are using a proxy, you need to turn off the proxy in your device, or the result will be wrong.

Open Source license

The project is open source and licensed under the GNU GPL v3 license. If you want to use it, please obey these license:

  • You can use the project for your python projects.
  • You can modify and redistribute the project, but you must use GPLv3 license and keep the author's name in your source code.
  • For any purpose, this program is forbidden to use for commercial use, including but not limited to enterprise website, business application, business promotion.
  • For any purpose, as long as your program uses the pyeumonia package, no ads are allowed in the program, even if it is open source.

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

pyeumonia-0.6.3b0.tar.gz (38.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

pyeumonia-0.6.3b0-py3.10.egg (15.5 kB view details)

Uploaded Egg

pyeumonia-0.6.3b0-py3-none-any.whl (39.0 kB view details)

Uploaded Python 3

File details

Details for the file pyeumonia-0.6.3b0.tar.gz.

File metadata

  • Download URL: pyeumonia-0.6.3b0.tar.gz
  • Upload date:
  • Size: 38.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for pyeumonia-0.6.3b0.tar.gz
Algorithm Hash digest
SHA256 a193e8d3c7502d97b19c776e73a53c0e206e272b6197fc6330464fdb05840045
MD5 5e0354aead87302623fe73e99ec9be1b
BLAKE2b-256 64a02bb43c66fb5b56d7b2ebf0f76eb9fdef877eec6c56e67aab1fce7fd1dbf5

See more details on using hashes here.

File details

Details for the file pyeumonia-0.6.3b0-py3.10.egg.

File metadata

  • Download URL: pyeumonia-0.6.3b0-py3.10.egg
  • Upload date:
  • Size: 15.5 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for pyeumonia-0.6.3b0-py3.10.egg
Algorithm Hash digest
SHA256 e2b4af1b1f30aaa34cc6a06519cfcdabd31bbd2a984659e5402c6bac16714379
MD5 08abf764c3a2cc744432b10d5f714141
BLAKE2b-256 fd87ce93d5d75011ee9caa31c6823c801e6b2c13dd35ace33a3df07a0cc1a58c

See more details on using hashes here.

File details

Details for the file pyeumonia-0.6.3b0-py3-none-any.whl.

File metadata

  • Download URL: pyeumonia-0.6.3b0-py3-none-any.whl
  • Upload date:
  • Size: 39.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for pyeumonia-0.6.3b0-py3-none-any.whl
Algorithm Hash digest
SHA256 b6d2bead099b0f2ebb10b5ea0e0ab285a3388aba6f383110bffc314c77bf9c8f
MD5 7d16437ee411dbe43c31cd7dd369f03d
BLAKE2b-256 61b9280e229ef16591774704dcb7dd29b21773a9d0479b57c0a7574d000dbeaf

See more details on using hashes here.

Supported by

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