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.4b0.tar.gz (38.9 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.4b0-py3.10.egg (15.5 kB view details)

Uploaded Egg

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyeumonia-0.6.4b0.tar.gz
  • Upload date:
  • Size: 38.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.8.3 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.5

File hashes

Hashes for pyeumonia-0.6.4b0.tar.gz
Algorithm Hash digest
SHA256 40ef4fcf1b4aba6ac8add8b0a9327f4912b40428924434599e83789eefb32afe
MD5 7cd0017e7d3f5d98be69c3465fdd8bbb
BLAKE2b-256 172b1abc3cfb045d89ba4f7861b9c4e40cb830e915db11b352c5352f50464cc0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyeumonia-0.6.4b0-py3.10.egg
  • Upload date:
  • Size: 15.5 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.8.3 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.5

File hashes

Hashes for pyeumonia-0.6.4b0-py3.10.egg
Algorithm Hash digest
SHA256 f53926b370f0c74eb8bdc9db5932763bf9d7efd1a46c16b397cbf9434375f011
MD5 1f9a23d6b07d20c8781cd9f6812b0d7c
BLAKE2b-256 1b16f0bfa54e184cf23a35166c1229893392acba9a6c1b95b9c9312b0ae430f4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyeumonia-0.6.4b0-py3-none-any.whl
  • Upload date:
  • Size: 39.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.8.3 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.5

File hashes

Hashes for pyeumonia-0.6.4b0-py3-none-any.whl
Algorithm Hash digest
SHA256 0c63579587ee4fefdf94b17d6b9327506662dea70f378797ef1b230e4a49e2dc
MD5 3d3f2be76bcc225570700f51d2c48dc1
BLAKE2b-256 cc396d9620682463130de1ad5137a08f72a3f40f8f11dfd1742e4942619edbaa

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