Skip to content

FastAPI-based REST API application with SQLAlchemy integration

Notifications You must be signed in to change notification settings

AlgorithmAlchemy/fastapi-sqladmin-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

56 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

SQLAdmin - CRUD Admin

The project is a FastAPI-based REST API application with SQLAlchemy and SQLAdmin integration, featuring automatic table generation and a CRUD interface for all models.

dd_DeWatermark

Features

  • CRUD support for models: Product, Category, User
  • Integrated SQLAdmin panel Automatic table creation on startup
  • OpenAPI documentation available at /docs
  • Authentication via User model (optional)

Project Structure

.
β”œβ”€β”€ app/
β”‚   β”œβ”€β”€ models/        # SQLAlchemy models
β”‚   β”œβ”€β”€ schemas/       # Pydantic schemas
β”‚   β”œβ”€β”€ admin/         # SQLAdmin configuration
β”‚   β”œβ”€β”€ crud/          # CRUD operations
β”‚   └── main.py        # Entry point
β”œβ”€β”€ requirements.txt
└── README_en.md

Models

  • Product: id, name, category_id, description, changelog
  • Category: id, name
  • User: id, username, email

Installation

git clone https://github.com/AlgorithmAlchemy/fastapi-sqladmin-template
cd fastapi-sqladmin-template
python -m venv venv
source venv/bin/activate  # or .\venv\Scripts\activate on Windows
pip install -r requirements.txt
uvicorn app.main:app --reload

Dependencies

Admin Panel

http://127.0.0.1:8000/admin

API Documentation

http://127.0.0.1:8000/docs

About

FastAPI-based REST API application with SQLAlchemy integration

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published