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.

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.5.2b0.tar.gz (38.1 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.5.2b0-py3.9.egg (15.0 kB view details)

Uploaded Egg

pyeumonia-0.5.2b0-py3-none-any.whl (38.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyeumonia-0.5.2b0.tar.gz
Algorithm Hash digest
SHA256 9d718a7086b9aa206edd889eae4ba923b69834d2d7fa575c9e4135c3b5519a4d
MD5 2b4542abc0e5c990c805ba358a4c462f
BLAKE2b-256 086c15905339049a5681d40a58a264e0b35cb78bcca14f0c311b7628e0c24ac1

See more details on using hashes here.

File details

Details for the file pyeumonia-0.5.2b0-py3.9.egg.

File metadata

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

File hashes

Hashes for pyeumonia-0.5.2b0-py3.9.egg
Algorithm Hash digest
SHA256 0b6c5c910890111cd8e37812f32f724534ae7185047ddd51febf30a1896f1ab0
MD5 e508b004867ab7611ec7fefe0e940c19
BLAKE2b-256 a575faf495c1e48ecff7356ba95e92ab2eb7df53a0fe86b535212aded6f5941e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyeumonia-0.5.2b0-py3-none-any.whl
  • Upload date:
  • Size: 38.5 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.5.2b0-py3-none-any.whl
Algorithm Hash digest
SHA256 7c03e7f0da0cacbc38741c9bdab98cadb3773dcccd1b68d29cc64d85b6bc3faa
MD5 57f800d75e1f196980842aef7c87366a
BLAKE2b-256 18d6024e23d890248d70727b936abf9f2509e86f34cc56c314ee953b30cd7fc5

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