Code Monkey home page Code Monkey logo

covid-restapi's Introduction

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.

covid-restapi's People

Contributors

zipzap11 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.