This is a FastAPI project template that provides a customizable migration manager. It is designed to help developers quickly set up a FastAPI application with a robust database migration system powered by Alembic. The project uses the Poetry package manager for dependency management and virtual environment handling.
Before you begin, ensure you have the following installed:
- Python 3.12 or higher
- pip (Python package installer)
If you don't already have Poetry installed, you can install it using pip:
pip install poetry
Clone this repository to your local machine:
git clone https://github.com/ahMADASSadi/FastApi_Template.git
Navigate to the project directory and run the following commands:
poetry env use python3.12
poetry install
poetry shell
This project is designed for ease of use. With just a few commands, you can make migrations, apply migrations, and run the server. Follow these steps:
Note: Ensure you have set up and configured the database before proceeding to avoid issues.
Navigate to the root of the project (the directory containing the app
folder) to ensure the commands work correctly.
python -m app.main makemigrations
python -m app.main migrate
python -m app.main
That's it! 🎉
Contributions to improve and enhance this project are highly welcome! Feel free to fork the repository and submit a pull request. 😊