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 private beta, but it's 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.covid19 import Covid19

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

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

from pyeumonia.covid19 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.covid19 import Covid19

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

Get timeline data from a country:

from pyeumonia.covid19 import Covid19

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

Get timeline data from your country:

from pyeumonia.covid19 import Covid19

covid = Covid19(language='en_US')
# Get covid-19 data from your country in the last 30 days
data = covid.country_covid_data(auto=True, 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.

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.2.3a0.tar.gz (32.3 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.2.3a0-py3.10.egg (7.9 kB view details)

Uploaded Egg

pyeumonia-0.2.3a0-py3-none-any.whl (31.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyeumonia-0.2.3a0.tar.gz
Algorithm Hash digest
SHA256 d2faa36bd2e4989c50e35373e7fda7ea3c5b9bce652946caf5f4d89668897fff
MD5 b73f38b42ee2cf7629fb59725c537a46
BLAKE2b-256 3c67b32d519ebf0d15c41531e79f91c74c1912061860686e95a0bd12ee6b9313

See more details on using hashes here.

File details

Details for the file pyeumonia-0.2.3a0-py3.10.egg.

File metadata

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

File hashes

Hashes for pyeumonia-0.2.3a0-py3.10.egg
Algorithm Hash digest
SHA256 d8a7be47aa88da3955068dedebfee31176845ee0dbd199b464931a81d1185131
MD5 3cd2cf3ac997495922df644d6acfeb05
BLAKE2b-256 3de0fd2f9567c6e7e0d43dd9b83c1a922972b8be8e326abd69c45157f406c581

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyeumonia-0.2.3a0-py3-none-any.whl
  • Upload date:
  • Size: 31.4 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.2.3a0-py3-none-any.whl
Algorithm Hash digest
SHA256 1dfd51edf32256f72a802da8ed950397f3707769795c3d785c2b7b2246d10b54
MD5 fc04eb89c94eaf24bd059c065ebeb8fa
BLAKE2b-256 b470436e09369c804d6cd4c24d9e9a208776fc33ad5b2b2591f301e3139a0df8

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