Skip to main content

Auto-generated admin panel for FastAPI + SQLAlchemy — like Django Admin

Project description

fastapi-admin-panel

Auto-generated admin panel for FastAPI + SQLAlchemy — like Django Admin


The Problem

Django has a built-in admin panel. FastAPI doesn't. You end up writing CRUD endpoints by hand for every model.

The Solution

pip install fastapi-admin-panel
from fastapi_admin import AdminPanel

admin = AdminPanel(title="My Admin", get_db=get_db)
admin.register(User, list_columns=["id", "email", "role", "is_active"])
admin.register(Transaction, list_columns=["id", "amount", "status", "created_at"])

app.include_router(admin.router, prefix="/admin")

Visit /admin and you get a dark-themed dashboard with:

  • Model list with pagination
  • Detail view for each record
  • Delete endpoint
  • Auto-detected columns from SQLAlchemy model

Features

Feature Description
Auto CRUD List, detail, delete from model inspection
HTML Dashboard Dark-themed responsive admin UI
Pagination Automatic page navigation
Custom columns Choose which columns to display
Custom names Rename models in the UI
Multiple models Register as many as you need
No dependencies Only needs FastAPI + SQLAlchemy

API Endpoints Generated

For each registered model (e.g. users):

Method Path Description
GET /admin/ Dashboard index
GET /admin/users Paginated HTML list
GET /admin/users/{id} JSON detail
DELETE /admin/users/{id} Delete record

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fastapi_admin_panel-0.1.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fastapi_admin_panel-0.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_admin_panel-0.1.0.tar.gz.

File metadata

  • Download URL: fastapi_admin_panel-0.1.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for fastapi_admin_panel-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e63dd63ce936013072841febca626a6786bc08f2d9ba0b034ccfca627557e505
MD5 a36e69d4a39b8f4748fa9b72649113c4
BLAKE2b-256 e6ed44367a7eab9c8ce05a3c370910398d0435db4b6bc68c890bc5a2119d0688

See more details on using hashes here.

File details

Details for the file fastapi_admin_panel-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for fastapi_admin_panel-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b324fbbf298b90b0d1d9b73d97b26fd425ea552df69cfab5afebb9b97da8969a
MD5 0bdd3de9000f56e44a08b0d24a7f920d
BLAKE2b-256 9cf96cf7ee2542643a7dd56bf69f83ba2ed02e62602f6c98dfa18b57700eb83b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page