https://github.com/ahmadassadi/fastapi_template
A FastAPI-based Template for ease of use
https://github.com/ahmadassadi/fastapi_template
Last synced: 7 months ago
JSON representation
A FastAPI-based Template for ease of use
- Host: GitHub
- URL: https://github.com/ahmadassadi/fastapi_template
- Owner: ahMADASSadi
- License: apache-2.0
- Created: 2024-12-03T16:13:55.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-02-20T20:28:13.000Z (8 months ago)
- Last Synced: 2025-02-20T21:29:36.373Z (8 months ago)
- Language: Python
- Homepage:
- Size: 198 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FastAPI Project Template
## Overview
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.
## Prerequisites
Before you begin, ensure you have the following installed:
- Python 3.12 or higher
- pip (Python package installer)## Installation
### Step 1: Install Poetry
If you don't already have Poetry installed, you can install it using pip:
```bash
pip install poetry
```### Step 2: Clone the Repository
Clone this repository to your local machine:
```bash
git clone https://github.com/ahMADASSadi/FastApi_Template.git
```### Step 3: Install Dependencies and Activate the Environment
Navigate to the project directory and run the following commands:
```bash
poetry env use python3.12
poetry install
poetry shell
```## Usage
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.
### Create Migrations
```bash
python -m app.main makemigrations
```### Apply Migrations
```bash
python -m app.main migrate
```### Run the Server
```bash
python -m app.main
```## Contributing
That's it! 🎉
Contributions to improve and enhance this project are highly welcome! Feel free to fork the repository and submit a pull request. 😊