Skip to content

WORK IN PROGRESS - A scaffold for microservices using Python and FastAPI. This project is intended to be used as a template for new projects.

Notifications You must be signed in to change notification settings

skvggor/microservice-python-fastapi

Repository files navigation

microservice-python-fastapi

WORK IN PROGRESS

A scaffold for microservices using Python and FastAPI. This project is intended to be used as a template for new projects.


microservice-python-fastapi


Dependencies (docker)

  • Docker
  • Docker Compose

Set .env

cp .env.example .env

Run

docker-compose up --build

Dependencies (local)

  • Python 3.10+
  • Pip + virtualenv

Prepare

python3 -m venv venv
source venv/bin/activate
pip install pip-tools
pip-compile requirements.in

Installation

pip install -r requirements.txt

Run

Development

fastapi dev main.py

Production

fastapi run --host 0.0.0.0 --port 8000

Test

pytest

Coverage

pytest -vv --cov=. --cov=src --cov-report=term-missing --cov-report=xml .

About

WORK IN PROGRESS - A scaffold for microservices using Python and FastAPI. This project is intended to be used as a template for new projects.

Topics

Resources

Stars

Watchers

Forks