Skip to main content

adminsite

An admin panel for the SQLAlchemy 2.0 ORM that works with FastAPI, Starlette and Litestar.

PyPI Python CI License

Live demo · Documentation · Changelog · Discussions · For AI assistants

The orders list of the demo shop

adminsite is not a side project. Our own business runs its back office on it every day.

Installation

pip install adminsite

Add the driver your database needs, such as asyncpg or aiosqlite.

Usage

from adminsite import Admin, Link, ModelView


class OrderView(ModelView[Order]):
    fields = [Order.id, Order.customer, Order.status, Order.total]
    searchable_fields = [
        Link(Order.customer, Customer.name),
        Link(Order.customer, Customer.email),
    ]
    list_filters = [Order.status, Order.created_at]


app.mount("/admin", Admin(engine, views=[OrderView]))

The settings name your models' own attributes, so a type checker catches a misspelt one. The labels, filters, form controls and validation come from your models. Getting started builds a complete app, signing in included, in a few minutes.

Features

  • Pages from your models: a searchable, sortable list with filters and saved views, a page for each record, and forms with validation.
  • Editing in the list for a value that changes often, such as an order's status.
  • Lists that keep up to date on their own, for records that come in while people watch, such as new orders.
  • Form layouts with panels, rows and tabs, which the record page follows too.
  • Related records: pick a related record from a searchable list, and edit child rows, such as an order's lines, inside the parent's form.
  • JSON columns edited with a form built from a Pydantic model or a TypedDict, instead of a code box.
  • Built-in filters for choices, yes or no, number and date ranges, related records picked by name, and text.
  • Custom filters for anything the built-in ones do not cover, such as "overdue" or "spent over €1,000".
  • Actions that run your own code on the selected rows, on every row the filters match, on one record or on the whole table, with a dialog for any values they need.
  • Permissions for each view, action, field and row.
  • Hooks that run your code before and after a save or delete, in the same transaction, and can refuse it with a message.
  • An audit log: who changed what and when, including actions, exports and sign ins, with a history on every record and an activity page you can filter.
  • Import from CSV or Excel with a preview of every row, and export to CSV.
  • File and image uploads, stored on disk or wherever you choose.
  • A dashboard of stats, charts and the latest records.
  • A command palette: Ctrl K jumps to any page or record.
  • A JSON API that shares the same views and permissions.
  • Signing in with a fixed list of users or your own user table.
  • Pages and plugins of your own, such as reports or settings, in the same layout.
  • Translations into eleven languages, among them Persian and Arabic laid out right to left, and every time shown in the reader's time zone.
  • Light and dark themes, a layout for phones, and pages that work with a keyboard and a screen reader.
  • Async or sync, on SQLite, Postgres and MySQL, with no N+1 queries.
  • SQLModel models as they are.
  • Large tables: rows never wait for their count, which can be estimated or skipped, and page 400 costs the same as page 1.
  • No Node and no CDN: everything ships inside the package.

How it works

adminsite is one ASGI app, mounted inside yours. Every page and the JSON API go through the ModelView you write for each model, so its rules hold everywhere.

A request goes from the browser or a script to adminsite's pages or JSON API, through each model's ModelView and a SQLAlchemy repository, to your database

Documentation

  • Getting started sets up a working admin in a few minutes.
  • Views covers everything a view can say about a model.
  • Permissions is worth reading before you put the admin in front of anyone.
  • The reference lists every class and option.

Contributing

Ask a question or share an idea in Discussions. Issues and pull requests are welcome. CONTRIBUTING.md says how to run the tests and rebuild the stylesheet.

License

MIT

Metadata

Release files for adminsite 0.1.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 adminsite 0.1.0
File Size Uploaded
adminsite-0.1.0.tar.gz 1.5 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for adminsite 0.1.0
File Interpreter ABI Platform
adminsite-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 2.0 MB

Release files / adminsite-0.1.0.tar.gz

Download URL adminsite-0.1.0.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
dd3f758c39304ec9e5bac8e06af7ee5d43c55d47e81735e2caa23f6c389e9843
BLAKE2b-256 checksum
How to use checksums
052eff2eaf9abcb132d9b2bd47197860015e32e21c14374d13c3f8bdd8027789
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 10, 2026.

Transparency log

Release files / adminsite-0.1.0-py3-none-any.whl

Download URL adminsite-0.1.0-py3-none-any.whl
Size 506.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
47a08670b64233782f4615867bc0debc097d19a6e6da44fd838ef3dd0df7d413
BLAKE2b-256 checksum
How to use checksums
d24babfccaabb06c7657cfef9c83e7a9d3287fc2bf9cba0565d72328860d737a
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 10, 2026.

Transparency log
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