Skip to main content

fastui_admin

CI Coverage Documentation Status PyPI - Version PyPI - Python Version License - MIT GitHub Stars Latest Commit

Checked with mypy linting - Ruff OpenSSF Scorecard GitHub Tag

Downloads Downloads/Month Downloads/Week

Build better Admin UIs faster.

Build admin interfaces for FastAPI applications using FastUI and SQLAlchemy.

Inspired by Flask-Admin and SQLAdmin.

Note: FastUI Admin is an active work in progress. The API may change as the project matures alongside FastUI.


Table of Contents

Installation

fastui_admin is a library. Add it to your project as a dependency:

uv add fastui-admin

Or with pip:

pip install fastui-admin

For async SQLite support (used in examples):

pip install aiosqlite greenlet

Verify the installation

The package root is importable after installation:

>>> from fastui_admin import __doc__
>>> isinstance(__doc__, str)
True

Features

  • Automatic CRUD interface for SQLAlchemy models
  • List view with pagination
  • Detail, create, edit, and delete views
  • Auto-generated forms from model columns
  • Navigation bar with registered model views
  • Configurable columns, page size, and permissions
  • Mounts as a sub-application on FastAPI or Starlette

Quick Start

from fastapi import FastAPI
from sqlalchemy import Boolean, Integer, String
from sqlalchemy.ext.asyncio import create_async_engine
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column

from fastui_admin import BaseAdmin, BaseModelView


# Define your models
class Base(DeclarativeBase):
    pass


class User(Base):
    __tablename__ = "users"

    id: Mapped[int] = mapped_column(Integer, primary_key=True)
    username: Mapped[str] = mapped_column(String(50), unique=True)
    email: Mapped[str] = mapped_column(String(100))
    is_active: Mapped[bool] = mapped_column(Boolean, default=True)


# Define admin views
class UserAdmin(BaseModelView, model=User):
    name = "Users"
    column_list = ["id", "username", "email", "is_active"]
    page_size = 25


# Set up the app
app = FastAPI()
engine = create_async_engine("sqlite+aiosqlite:///./db.sqlite3")

admin = BaseAdmin(app, engine, title="My Admin")
admin.add_view(UserAdmin)
admin.mount()

Run the app and visit http://localhost:8000/admin/.

Configuration

BaseAdmin

Parameter Type Default Description
app FastAPI | Starlette required Application to mount admin on
engine Engine | AsyncEngine None SQLAlchemy engine
session_maker sessionmaker | async_sessionmaker None Custom session maker
title str "Admin" Admin interface title
base_url str "/admin" Base URL path
logo_url str None Logo image URL

BaseModelView

Parameter Type Default Description
model class keyword required SQLAlchemy model class
name str Model name Display name
column_list list[str] All columns Columns to show in list view
column_exclude_list list[str] [] Columns to exclude from list
page_size int 25 Items per page
can_create bool True Enable create action
can_edit bool True Enable edit action
can_delete bool True Enable delete action
can_view_details bool True Enable detail view

Examples

See the examples/simple directory for a complete working example with User and Post models.

# Run the example
uvicorn examples.simple.main:app --port 5000

# Seed sample data
curl -X POST http://localhost:5000/seed

# Visit admin interface
open http://localhost:5000/admin/

Feature Parity

Comparison with Flask-Admin and SQLAdmin (ref: sqladmin#316).

General Features

Feature Flask-Admin SQLAdmin FastUI Admin
ModelView ✅ ✅ ✅
BaseView (custom pages) ✅ ❌ ✅
Authentication ✅ ✅ ❌
Ajax / search ✅ ❌ ❌
Custom templates ✅ ✅ ❌
Batch actions ✅ ❌ ❌
Inline models ✅ ❌ ❌
Export (CSV, etc.) ✅ ✅ ❌
File/image upload ✅ ✅ ❌
I18n ✅ ❌ ❌
Async support ❌ ✅ ✅

ModelView Options

Option Flask-Admin SQLAdmin FastUI Admin
can_create ✅ ✅ ✅
can_edit ✅ ✅ ✅
can_delete ✅ ✅ ✅
can_view_details ✅ ✅ ✅
can_export ✅ ✅ ❌
column_list ✅ ✅ ✅
column_exclude_list ✅ ✅ ✅
column_formatters ✅ ✅ ❌
column_searchable_list ✅ ✅ ❌
column_sortable_list ✅ ✅ ❌
column_default_sort ✅ ✅ ❌
column_labels ✅ ✅ ❌
page_size ✅ ✅ ✅
form_include_pk ✅ ✅ ❌
form_columns ✅ ✅ ❌
form_excluded_columns ✅ ✅ ❌
form_widget_args ✅ ✅ ❌
form_args ✅ ✅ ❌

Roadmap

See the Roadmap issue for the full feature roadmap, including planned support for column sorting, search/filtering, authentication, export, and more.

Support ❤️

If you have any questions or need help, feel free to open an issue on the GitHub repository.

Motivation

Existing SQLAlchemy admin interfaces render server-side HTML. FastUI Admin brings the same ModelView ergonomics — list, detail, create, edit, and delete views with configurable columns and page size — to FastUI-based FastAPI applications, mounting as a sub-application on FastAPI or Starlette.

About

FastUI Admin provides an automatic CRUD interface for SQLAlchemy models (sync and async), with auto-generated forms from model columns, a navigation bar with registered model views, and configurable columns, page size, and permissions.

Author 🫅

This project is maintained by Hasan Sezer Taşan, It's me 👋

Analysis

Contributing ❤️

Any contributions are welcome! Please follow the Contributing Guidelines to contribute to this project.

Development 🧰

See the Contributing Guidelines for local setup, the common development tasks (exposed via mise), building and previewing the documentation, and the VS Code debugging configurations.

Releasing

Versioning and releases are automated with release-please, driven by Conventional Commit PR titles squash-merged into main. release-please maintains a release PR that bumps the version and CHANGELOG.md; merging it tags the release and publishes to PyPI. See the Contributing Guidelines for the commit conventions, and the Repository setup guide for one-time configuration and optional post-launch integrations such as a social preview, downstream packaging, and Repology.

Pause merges that change .github/workflows/, including Renovate action-pin updates, from merging a release PR until the entire Release run finishes. Workflow differences between the release commit and current main can block tag or release creation with a 403 when using GITHUB_TOKEN. See Release recovery for prevention and recovery steps.

For adoption or template-update reconciliation, ask your agent to "audit this template adoption/update against our existing project behavior". The shipped template-adoption skill also supports audits after an update was applied. It compares workflow behavior, required checks, custom tooling, and documentation, and asks before consequential cleanup. Its prek-workflow example shows why duplicate commands alone do not justify removing a workflow. Use the sibling repo-setup skill for repository settings and release setup.

Credits

Vibe coded by Claude Opus 4.5, reviewed and tested by @hasansezertasan.

This package was created with Copier and the hasansezertasan/copier-pyproject project template.

License 📜

fastui-admin is distributed under the terms of the MIT license.

Changelog 📝

For a detailed list of changes, please refer to the CHANGELOG.

Metadata

Release files for fastui-admin 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fastui-admin 0.2.0
File Size Uploaded Provenance
fastui_admin-0.2.0.tar.gz 49.0 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for fastui-admin 0.2.0
File Interpreter ABI Platform
fastui_admin-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 72.5 kB

Release files / fastui_admin-0.2.0.tar.gz

Download URL fastui_admin-0.2.0.tar.gz
Size 49.0 kB
Tags Source
SHA-256 checksum
How to use checksums
aa53841647d55830f827e55121e2393e5057d6ab2eee32389090cf7876215c41
BLAKE2b-256 checksum
How to use checksums
a8149a53f586f262bccaabb32b31ee15710b565cf43889d05b1d487a66e1523b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Release files / fastui_admin-0.2.0-py3-none-any.whl

Download URL fastui_admin-0.2.0-py3-none-any.whl
Size 23.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b33cb4e4e66915656589548159cbe3256f838c4ac02eadbe24eddd6e754baa5
BLAKE2b-256 checksum
How to use checksums
5b863e526a7bb9685d860bb1134ea8eb0e4036696e2ebade72e68f769edc626d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

Security for fastui-admin 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for fastui_admin-0.2.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page