A complete revision-focused backend project built using FastAPI and SQLAlchemy, demonstrating a clean, modular, and scalable REST API architecture.
This repository is intended to practice and showcase industry-level backend structure, proper separation of concerns, and RESTful API development using Python.
This project implements a User-based REST API with a well-structured backend architecture.
The application is organized into separate modules for database handling, models, schemas, services, routers, and configuration.
⚠️ This project does not include authentication.
The main focus is on application structure, database integration, and clean code practices.
- FastAPI application structure
- Modular backend architecture
- SQLAlchemy ORM usage
- SQLite database integration
- Pydantic models for data validation
- API Routers for clean endpoint separation
- Service layer for business logic
- RESTful API design principles
app/
│
├── database/
│ └── database.py # Database connection & session management
│
├── models/
│ └── user.py # SQLAlchemy ORM models
│
├── schemas/
│ └── user.py # Pydantic request/response schemas
│
├── services/
│ └── user_service.py # Business logic layer
│
├── routers/
│ └── user.py # User API routes
│
├── config/
│ └── config.py # Application configuration
│
├── main.py # FastAPI application entry point- Python
- FastAPI
- SQLAlchemy
- SQLite
- Pydantic
- Uvicorn
- API Routers
This REST API supports standard CRUD operations for users:
- Create user
- Fetch user details
- Update user information
- Delete user
- Input & output validation using Pydantic
- Clean separation between routes, services, and database logic
git clone https://github.com/Nevin100/FastAPI-SQLAlchemy-Revision.git
cd FastAPI-SQLAlchemy-Revisionpython -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activatepip install fastapi uvicorn sqlalchemy pydanticuvicorn app.main:app --reloadSwagger UI:
http://127.0.0.1:8000/docsReDoc:
http://127.0.0.1:8000/redoc