Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/radekbednarik/czech-covid19-data-api

api wrapper for official covid19 data. Written in Python. Data source https://onemocneni-aktualne.mzcr.cz/api/v2/covid-19.
https://github.com/radekbednarik/czech-covid19-data-api

api api-wrapper covid czech python

Last synced: 16 days ago
JSON representation

api wrapper for official covid19 data. Written in Python. Data source https://onemocneni-aktualne.mzcr.cz/api/v2/covid-19.

Awesome Lists containing this project

README

        

# czech-covid19-data-api
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

API wrapper for official covid19 data. Written in Python. Data source https://onemocneni-aktualne.mzcr.cz/api/v2/covid-19.

## Installation
Just use:
```
pip install czech-covid19-data-api
```

## API documentation
[Sphinx](https://www.sphinx-doc.org/en/master/index.html) autogenerated API docs can be found [HERE](https://czech-covid19-data-api.readthedocs.io/en/latest/index.html). Nothing fancy, but gets the job done.

## How to use

Example 1: Get data in JSON format:

```
from covid19_api.src import api

if __name__ == "__main__":
(status, data) = api.get_deaths_overview()

if status:
print(data)
```

Example 2: Get data in CSV format:

```
from covid19_api.src import api

if __name__ == "__main__":
(status, data) = api.get_deaths_overview(resource="/umrti.csv")

if status:
print(data)
```