Skip to main content

Thai Covid-19 status

Project description

Covid19-Open-API

Example usage

from covid19openapi import ThaiCovid19

if __name__ == '__main__':
    thai = ThaiCovid19()
    today = thai.get('today')
    timeline = thai.get('timeline')
    all_field = thai.get_all()

    print(today)
    print(all_field)

You can pass your source to the constructor also you will need to somehow register api in config.py

Default source is "covid19.th-stat.com"

Get api based on your source field. e.g.

  • today
  • timeline
  • cases
  • cases_sum
  • area

requests.get is used so you can pass kwargs as documented at https://requests.readthedocs.io/en/master/user/quickstart/

REFERENCES: https://covid19.th-stat.com/

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-open-api-0.0.2.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

covid19_open_api-0.0.2-py3-none-any.whl (4.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page