Skip to main content

Python module for getting data from covid19.go.id

Project description

covid19-id

covid19-id - PyPi Supported Python versions LICENSE

Python module for getting data from covid19.go.id Modul python untuk mengambil data dari covid19.go.id

Install

You can install or upgrade covid19-id with:

pip install covid19-id --upgrade

Optional Dependencies

covid19-id can be installed with optional ujson dependency.

pip install covid19-id[ujson]`.

It will then be used for JSON decoding, which can bring speed up compared to the standard json library.

Example

Get Updates

import covid19_id

all_update = covid19_id.get_update()

total = all_update.update.total

print(f"covid19; positive cases in Indonesia : {total.jumlah_positif}")
print(f"covid19; patients treated in Indonesia {total.jumlah_dirawat}")
print(f"covid19; patients recovered in Indonesia {total.jumlah_sembuh}")
print(f"covid19; patients died in Indonesia {total.jumlah_meninggal}")

Provinsi

import covid19_id

data_provinsi = covid19_id.get_prov()

for provinsi in data_provinsi.list_data:
    print(f"Province : {provinsi.key}")
    print(f"Cases {provinsi.jumlah_kasus}")
    print(f"Recovered {provinsi.jumlah_sembuh}")
    print(f"Died {provinsi.jumlah_meninggal}")
    for umur in provinsi.kelompok_umur:
        print(f"Age {umur.key} : {umur.doc_count}")
    penambahan = provinsi.penambahan
    print(f"Additional Positive Cases {penambahan.positif}")
    print(f"Additional Recovered {penambahan.sembuh}")
    print(f"Additional Died {penambahan.meninggal}")
    print("")

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

covid19-id-0.3.0.tar.gz (5.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

covid19_id-0.3.0-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file covid19-id-0.3.0.tar.gz.

File metadata

  • Download URL: covid19-id-0.3.0.tar.gz
  • Upload date:
  • Size: 5.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.5 Windows/10

File hashes

Hashes for covid19-id-0.3.0.tar.gz
Algorithm Hash digest
SHA256 a893fd668f205a9358a83fcb04678b8587b0bbfc42674d00592c2f798624af22
MD5 fe0d797bd6be3eb631c7869adbdbb4ad
BLAKE2b-256 d63652d270f7814ea7cb3bf2a25b5d2385b4265098b29937985d036066c6554a

See more details on using hashes here.

File details

Details for the file covid19_id-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: covid19_id-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 9.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.4 CPython/3.8.5 Windows/10

File hashes

Hashes for covid19_id-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7faf3ddedf41d887aee64d359199ff75352ddbc6f2bba7f5044d39e00e80061f
MD5 ee955de1024d8ed09e226f7fc61586f7
BLAKE2b-256 b27c7dbd3f42571af136a5a17ba106554ab81da0a1bd705762b9b98b6713e95d

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