/fastapi-quickstart

A quickstart of FastAPI

Primary LanguagePython

fastapi-quickstart

This is a quickstart of FastAPI.

  • Python 3.10
  • Use peewee as ORM.

Set up

Start up

Run with python

  1. Install dependencies

    $ pip install -r requirements.txt
  2. Run server

    $ python server.py

Run with docker

  1. Build docker image

    $ ./deploy.sh [env] [tag]
  2. Run docker container

    $ docker run -d -p 8000:8000 --name fastapi-quickstart fastapi-quickstart:[tag] server.py
  3. Check logs

    $ docker logs -f fastapi-quickstart

API

Open http://127.0.0.1:8000/fastapi/docs to check the API doc.