Skip to content

zipzap11/covid-restapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

53 Commits
 
 
 
 
 
 
 
 

Repository files navigation

COVID-19 REST-API

Rest api for covid data update, sourced from Indonesian Government.

Tools

Run

After cloning this repo, you need to install the dependencies needed. Python 3.6 or above is needed or you can just pull the docker image in this repository-link, or simply run this command

docker pull zipzap11/covid-api:1.0

If you want to run without container, just install dependencies below.

Install FastAPI

run this command

pip3 install fastapi

Install Uvicorn

run this command

pip3 install uvicorn

Install Requests

run this command

pip3 install requests

Run APP

run this command

uvicorn app.main:app

Run as Docker Container

First you need to build docker image with this command

docker build -t <image-name>:<image-tag> .

Example

docker build -t zipzap11/covid-api:1.0 .

Then run it with

docker run -t --name covid-api -p 8000:3000 zipzap11/covid:1.0

Routing

You can see the route documentation by starting the APP and go to localhost:8000/docs. There you can find all the routes provided in swagger UI

Test

To start unit test, you need to install pytest by simply run

pip3 install pytest

Then run

pytest

Unfortunately the unit test does not cover all the possible cases.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors