Skip to content

An example API built with FastAPI, PostgreSQL, and Docker.

License

Notifications You must be signed in to change notification settings

isgin01/web-api-example

Repository files navigation

An example of a API build with FastAPI.

Project Highlights:

  • FastAPI
  • Docker
  • PostgreSQL
  • Alembic
  • Unit tests
  • JWT Authentication

How to use

  • Install dependencies inside the backend folder:
uv venv && uv sync
  • Create a .env file in the same directory as .env-example.
  • Build and run the project with Docker (you may need to use sudo):
docker compose build && docker compose up
  • To run tests inside a Docker container, use this (again, you may need sudo):
bash scripts/test.sh
  • Run db migrations within a running Docker container with the backend:
alembic upgrade head
  • Use private endpoints to create users.

Optional

  • To set up pre-commit hooks, use this:
pre-commit install

About

An example API built with FastAPI, PostgreSQL, and Docker.

Topics

Resources

License

Stars

Watchers

Forks

Contributors