This is a basic CRUD (Create, Read, Update, Delete) application for managing products using FastAPI. The project is Dockerized for easy deployment.
- Python 3.10 or later
- Clone the repository:
git clone https://github.com/vineetpatel725/fastapi-crud-app.git
- Install dependencies:
pip install requirements.txt
- Update database configuration in config(.ini)
[database]
host = Host
port = Port
name = Database
username = Username
password = Password
- Run Application without docker:
start.sh
This approach is recommended for a production-like environment.
- Build the Docker image:
docker compose build
- Start the application and database:
docker compose up -d
The API will be accessible on port 8000
by default (http://localhost:8000/). It is configurable.
The core functionalities reside in these files:
main.py
: Entry point for the FastAPI application.db.py
: Handles database connectivity.models/
: Defines the models.schemas/
: Defines data schemas for request and response data.routes/
: Defines the routes.config/
: Handles required configurations for application