OpenAdmin is a FastAPI-native library for building admin panels. A page is a router, a widget is an endpoint — stats, tables, forms, actions, and charts, defined with typed decorators in plain Python.
from openadmin import spec
from openadmin.fastapi import AdminPage, AdminPanel
page = AdminPage("Dashboard", icon="layout-dashboard")
@page.stat("Total Users")
async def total_users() -> spec.Stat:
return 1_024
@page.table("Recent Users")
async def recent_users() -> spec.Table:
return {
"data": [
{"id": 1, "name": "Alice", "role": "admin"},
{"id": 2, "name": "Bob", "role": "viewer"},
]
}
admin = AdminPanel("My Admin")
admin.section("General", pages=[page])from fastapi import FastAPI
app = FastAPI()
app.mount("/admin", admin.app)Each decorated function is a normal FastAPI handler — dependency injection, Query/Body parameters, and OpenAPI docs all work as they would on any route.
pip install openadmin
# or
uv add openadminEverything else — the full component reference, authentication, and worked cookbook recipes — lives at:
openadmin-team.github.io/openadmin-py
- Getting Started — build a minimal panel end to end
- Components — stats, tables, forms, actions, and charts
- Authentication — gate the panel behind a login screen
- Cookbook — recipes for row actions, reference fields, and auth
# Run the example app
make dev/example
# Run all checks (format, lint, types, tests, security)
make check
# Auto-fix formatting and lint issues
make fixAGPL-3.0-or-later — © 2026 OpenAdmin

