Skip to main content

litestar-admin

CI PyPI version Python versions License: MIT

Modern admin panel framework for Litestar applications with a Cloudflare-inspired UI.

litestar-admin provides a production-ready admin interface for managing SQLAlchemy models in Litestar applications, featuring:

  • Cloudflare Dashboard-inspired UI - Modern dark theme with clean card layouts

  • Full CRUD Operations - Create, read, update, delete with bulk actions

  • RBAC Authorization - Role-based access control with granular permissions

  • Audit Logging - Track all admin actions for compliance

  • SQLAlchemy Integration - Works with SQLAlchemy 2.x and Advanced-Alchemy

  • Auto-discovery - Automatically discovers and registers models

  • JWT & OAuth2 Authentication - Flexible, pluggable auth backends

  • Static Export Frontend - Next.js frontend with no runtime Node.js required

    Examples

image image
image image

Installation

# Basic installation
pip install litestar-admin

# With JWT authentication
pip install litestar-admin[jwt]

# With OAuth support
pip install litestar-admin[oauth]

# With sqladmin bridge
pip install litestar-admin[sqladmin]

# All extras
pip install litestar-admin[all]

Quick Start

Point the plugin at your app and it picks up your SQLAlchemy models automatically:

from litestar import Litestar
from litestar_admin import AdminPlugin, AdminConfig
from sqlalchemy.orm import DeclarativeBase, Mapped, mapped_column


class Base(DeclarativeBase):
    pass


class User(Base):
    __tablename__ = "users"

    id: Mapped[int] = mapped_column(primary_key=True)
    email: Mapped[str] = mapped_column(unique=True)
    name: Mapped[str]


app = Litestar(
    plugins=[AdminPlugin(config=AdminConfig(title="My Admin"))]
)

That's it. Auto-discovery finds your models, builds column lists from the table schema, makes string columns searchable, and gives you full CRUD. No boilerplate view classes required.

Customizing a Model View

When you need more control over how a model looks or behaves in the admin, create a ModelView subclass. Auto-discovery skips any model that already has an explicit view registered.

from litestar_admin import ModelView

class UserAdmin(ModelView, model=User):
    column_list = ["id", "email", "name", "created_at"]
    column_exclude_list = ["password_hash"]
    column_searchable_list = ["email", "name"]
    column_default_sort = ("created_at", "desc")

    can_create = True
    can_edit = True
    can_delete = False

    page_size = 25

Pass it in via views=:

AdminConfig(
    title="My Admin",
    views=[UserAdmin],
)

Any models without an explicit view still get auto-discovered.

RBAC Guards

from litestar_admin.guards import require_permission, Permission

@get("/admin/users", guards=[require_permission(Permission.MODELS_READ)])
async def list_users() -> list[User]:
    ...

@post("/admin/users", guards=[require_permission(Permission.MODELS_WRITE)])
async def create_user(data: UserCreate) -> User:
    ...

Development

# Clone the repository
git clone https://github.com/JacobCoffee/litestar-admin.git
cd litestar-admin

# Install development dependencies
make dev

# Run tests
make test

# Run linting
make lint

# Build frontend
make frontend

# Build documentation
make docs

Documentation

Full documentation is available at jacobcoffee.github.io/litestar-admin.

License

MIT License - see LICENSE for details.

Metadata

Release files for litestar-admin 0.1.3

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

Source distribution (sdist)

Source distribution for litestar-admin 0.1.3
File Size Uploaded
litestar_admin-0.1.3.tar.gz 520.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for litestar-admin 0.1.3
File Interpreter ABI Platform
litestar_admin-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 1.2 MB

Release files / litestar_admin-0.1.3.tar.gz

Download URL litestar_admin-0.1.3.tar.gz
Size 520.6 kB
Tags Source
SHA-256 checksum
How to use checksums
b6d66c0ad9147406dc0dd625f83244f8c13385c1e580577a7c5be17248f0a54a
BLAKE2b-256 checksum
How to use checksums
d9b43a86bbdc7fa5d908b8a5a3e76d3a68f9f0575fa83075f791c73dceaf8481
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 11, 2026.

Transparency log

Release files / litestar_admin-0.1.3-py3-none-any.whl

Download URL litestar_admin-0.1.3-py3-none-any.whl
Size 645.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e58aee1ed3d0d923fca0b2f844c37650ca9fb2b7946a9c58d7024cec4aab0ff6
BLAKE2b-256 checksum
How to use checksums
4c59a45bdbf5f4127e62bd91b538080d49c243378fb0daa3f1ab673db5133d5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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