/fastapi-tutorial

Tutorial for FastAPI

Primary LanguagePythonApache License 2.0Apache-2.0

FastAPI Tutorial

Tutorial for FastAPI using Bunnet as an ODM for MongoDB

Tutorial

The full tutorial can be read here

Quick Start

  • Clone this repo
  • Make sure you have the following installed:
  • Install the dependencies:
    • pipenv install --dev
  • Run tests:
    • Activate your Pipenv environment: pipenv shell
    • Run tests: pytest tests/
  • Run app locally (after having activate your virtual environment):
    • uvicorn main:app --host 0.0.0.0 --reload
  • Build Docker image:
    • docker build --build-arg RUN_STAGE=DEV --build-arg BUILD_STAGE=DEV -t fastapi:latest .