Real world Fast-API application template using gino(Async ORM) based on hexagonal architecture
🛠Status: WIP
Under developement, WIP. Be patient.
A real wolrd template project using Fastapi framework as well as a full implementation of CI/CD.
Introduction to many of FastAPI's features, including pydantic models, dependency injection, and Gino (Async ORM) integration, using hexagonal architecture.
This repository contains a skeleton app which can be used to speed-up your next project.
for running the server locally
pip install pipenv
source setup/scripts/setEnv.sh
pipenv run make install-dev-deps
The command above will install for you a separate environnement and installing all dependencies
pipenv run make test
pipenv run make run
You must have docker and docker-compose tools installed in your system. Then just run:
make build-dev
make run-dev-containers
This will build the images and run 3 containers (Fastapi application, PostgreSQL, PGAdmin 4) in developement environnement.
If you want to run the containers in production environnement, you can do the following:
make build-prod
make run-prod-containers
Your can find the files to configure each environnement in the root directory:
Application will be available on localhost in your browser.
All routes are available on /docs paths with Swagger
TODO
TODO
Files related to application are in the src
or tests
directories.
Application parts are:
src
├── api - web related stuff.
├── core - application configuration, server management, logging.
├── domain - Business logic.
├── infrastructure - external services of the application like db.
└── main.py - FastAPI application entry point.
Contributions, issues and feature requests are welcome!
TODO