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.
- 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.
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.
- Python 3
- Pip
- pipenv
git clone git@github.com:wesley1263/skeleton-fastapi.git
cd app_name
pipenv install --dev
pipenv shell
cp dotenv_example .env
make init_db
after
make migrate
make run-app-local
The application is running in port:8000 - acesse http://localhost:8000/health-check
For run tests, use this commands:
pytest or
make testing make create_module 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!