Skip to main content

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

Reason this release was yanked:

This verson is EOL

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.0a0.tar.gz (26.2 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.0a0-py3.10.egg (2.1 kB view details)

Uploaded Egg

pyeumonia-0.2.0a0-py3-none-any.whl (25.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyeumonia-0.2.0a0.tar.gz
  • Upload date:
  • Size: 26.2 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.0a0.tar.gz
Algorithm Hash digest
SHA256 a0ad70e9f7fc668f18053888b5712f2332385f5442103cc412e2c8639eaa7aef
MD5 c9fa1977a888dcc5a608a3c688c2e63d
BLAKE2b-256 1c3083fd749bf23f543393129f18844111a9dd77ac1febc4dd236007be90bb31

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyeumonia-0.2.0a0-py3.10.egg
  • Upload date:
  • Size: 2.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.2.0a0-py3.10.egg
Algorithm Hash digest
SHA256 2d1655b4f2d3d1c552c430ff65b812e08228b196d38a929b800b4f2e1edd04e7
MD5 36a253c7ec7e7ac73c841c634830f90d
BLAKE2b-256 49350819a85952796253882f63f587fdea2c5e2d642ff9b2b99aca5b5eb2eb10

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyeumonia-0.2.0a0-py3-none-any.whl
  • Upload date:
  • Size: 25.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.2.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 90ce1419f3144675538ab6e81e59757bc30f1ea3f1300f08512a7fb068904e92
MD5 0c77697b4555367f18aaae3f738180dc
BLAKE2b-256 dae7a646b7472c259f13db18be93e9e6441991d60b673611e81d899435109534

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