{"repo":"douglaschalegre/fastapi-template","free":true,"listed":false,"github":"https://github.com/douglaschalegre/fastapi-template","clone":"git clone https://github.com/douglaschalegre/fastapi-template.git","description":"🔨 This is a template that serves as a kickstarter for a back-end API application. Implemented with FastAPI, Pydantic, SQLAlchemy and Alembic with a layered architecture structure.","language":"Python","stars":22,"topics":["backend","backend-api","fast-api","fastapi","postgresql","pydantic","pydantic-v2","python","sqlalchemy","alembic"],"license":null,"category":"databases-storage","readme_excerpt":"About 🧑🏻‍💻 This repository contains a simple API that serves as a kickstart for new projects using FastAPI, SQLAlchemy and PostgreSQL. It's built with a simple layered architecture, containing domain, service, repository and controller layers. With this layered architecture approach, it's possible to separate concerns and make the codebase more maintainable and scalable. It's also possible to add more layers if responsibilities grow within a specific layer. That being said, it's important to keep in mind that layers should be as independent as possible, and the dependencies should always point inwards, otherwise, could lead to ciclic dependencies mainly because of Pydantic schemas. - Main frameworks and packages: - FastAPI - SQLAlchemy (PostgreSQL database). How to run 🏃🏻‍♂️‍➡️ Install Python Install Python (version 3.10). Set and activate virtual environment ⚙ In project folder, execute the following commands: Set environment variables ⚙ Create a .env file with the required environment variables see [.env.example] Install required dependencies Run the following installation command: Run server 🚀 On virtual environment, execute Documentation 📚 While running the server, one can access the API documentation. TO DO 🛠 - [X] Improve middleware inclusion on app - [X] Add profiler (pyinstrument) - [ ] Add generic JWT Auth - [ ] Add endpoints that require auth - [X] Add alembic setup","default_branch":null,"files":null,"tree":[],"storefront":"/r/douglaschalegre","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/douglaschalegre/fastapi-template/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}