Skip to content

wesley1263/skeleton-fastapi

Repository files navigation

SKELETON FASTAPI


Python Boilerplate with FastAPI and Tortoise ORM

Python FastAPI Docker

Code style: black

Overview

Welcome to the repository of my Python Boilerplate with FastAPI, Tortoise ORM, and Aerich. This project was created with the idea of providing a modular and flexible structure, based on the principles of Domain-Driven Design (DDD) and Clean Architecture, but with a lighter, more 'pythonic' approach.

Key Features

  • Pythonic Modularity: The architecture of this boilerplate is designed with an emphasis on modularity, allowing for a more organized and easily extendable code structure.
  • FastAPI for Rapid Development: Harness the power of FastAPI to quickly build robust and scalable APIs with minimal development effort.
  • Tortoise ORM and Aerich for Data Persistence: Utilize Tortoise ORM to manage data persistence, ensuring efficient organization and simplified access to the application's data. Aerich is used to manage migrations smoothly and reliably.
  • Influences of DDD and Clean Architecture: While adopting the concepts of DDD and Clean Architecture, we strive to maintain an approach more adapted to the Python ecosystem, keeping the code clean, readable, and easily maintainable.

Getting Started

To get started, follow the installation and configuration instructions provided in the project's documentation section. Detailed documentation and practical examples will help you quickly understand how to make the most of this boilerplate.

Requirements

How to work

Clone this repository

git clone git@github.com:wesley1263/skeleton-fastapi.git

Access project directory in terminal

cd app_name

Install all dependencies

pipenv install --dev

Enable environment

pipenv shell

Make a copy dotenv file to environment file

cp dotenv_example .env

If you prefer to use a database, use the commands below

make init_db after make migrate

Running application in development mode

make run-app-local

The application is running in port:8000 - acesse http://localhost:8000/health-check

Running tests

For run tests, use this commands:

  pytest 

or

  make testing 

For create new module, use this commands:

  make create_module 

Contribution

Contributions are welcome! If you have any suggestions, issues, or wish to add new features, feel free to create a pull request. Please refer to the contribution guidelines in the CONTRIBUTING.md file.

I hope this boilerplate makes your work easier and helps drive your Python projects forward. Enjoy!


Reference

Author

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors