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.1a0.tar.gz (37.8 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.1a0-py3.9.egg (15.1 kB view details)

Uploaded Egg

pyeumonia-0.5.1a0-py3-none-any.whl (38.6 kB view details)

Uploaded Python 3

File details

Details for the file pyeumonia-0.5.1a0.tar.gz.

File metadata

  • Download URL: pyeumonia-0.5.1a0.tar.gz
  • Upload date:
  • Size: 37.8 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.1a0.tar.gz
Algorithm Hash digest
SHA256 ac8d87d0537227558e9709b5de30d66547da642172cf26247d4343879baa7da4
MD5 ba66877a7e7aa6946b18845c6e8d3eb4
BLAKE2b-256 13be759bb1511b2e18207e2308103331238f5b1955f6f4de12c7e9df36f09f43

See more details on using hashes here.

File details

Details for the file pyeumonia-0.5.1a0-py3.9.egg.

File metadata

  • Download URL: pyeumonia-0.5.1a0-py3.9.egg
  • Upload date:
  • Size: 15.1 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.1a0-py3.9.egg
Algorithm Hash digest
SHA256 84bc02f9d76a08301541824c1c93e49864c65a527f80db47b880cd0793dc820c
MD5 c67b2557a7d9aa65f248163e7721ab42
BLAKE2b-256 12b971aeaa8bc80a87f29989920436d44e613d3ee14785df251d5f82504ea5a2

See more details on using hashes here.

File details

Details for the file pyeumonia-0.5.1a0-py3-none-any.whl.

File metadata

  • Download URL: pyeumonia-0.5.1a0-py3-none-any.whl
  • Upload date:
  • Size: 38.6 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.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 046d060c3e3873e66d5fd4d1df6c2c30860c1e98a9f0c8db6bcd83944dddb36b
MD5 e277805267116f4b6b3b3dab5d30e488
BLAKE2b-256 8a0547e9fc5ce3df3710e6d76fe5310afee136bc30a64cd2ef8b2f62c29a345e

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