Skip to content

Repository files navigation

OpenAdmin

OpenAdmin

Admin dashboards as FastAPI routes. No templates, no frontend project, no config files.

PyPI Python FastAPI License

Documentation

OpenAdmin dashboard


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.

Installation

pip install openadmin
# or
uv add openadmin

Documentation

Everything else — the full component reference, authentication, and worked cookbook recipes — lives at:

openadmin-team.github.io/openadmin-py

Development

# Run the example app
make dev/example

# Run all checks (format, lint, types, tests, security)
make check

# Auto-fix formatting and lint issues
make fix

License

AGPL-3.0-or-later — © 2026 OpenAdmin