Muffin-Admin mounts a react-admin single page application on top of Muffin-REST resources. A resource that already has a REST API gets list, create, edit and delete screens without writing any JavaScript.
Read the documentation for configuration, resources, actions and authentication.
- Python 3.11 - 3.15
- Muffin >= 3.1 and Muffin-REST >= 14.2
- Peewee (
muffin-peewee-aio) or SQLAlchemy Core (muffin-databases) for a storage backend
pip install muffin-admin # core
pip install "muffin-admin[peewee]" # Peewee ORM
pip install "muffin-admin[sqlalchemy]" # SQLAlchemy Corefrom muffin_admin import Plugin, PWAdminHandler
admin = Plugin(app)
@admin.route
class UserResource(PWAdminHandler):
"""An admin resource for the User model."""
class Meta(PWAdminHandler.Meta):
model = User
filters = "email", "is_active", "role"
columns = "email", "is_active", "role", "created"The admin is served at /admin and the resource API at /admin/api. See the
quickstart for a complete application,
including models and startup.
- List, create, edit and delete screens for Peewee ORM and SQLAlchemy Core resources
- Filtering, sorting and pagination driven by Muffin-REST
- Custom actions with forms, confirmation and file downloads
- Dashboard cards and pluggable authorization hooks
- Translations, custom CSS/JS and Material-UI icons
| Guide | What it answers |
|---|---|
| Quickstart | Build a working admin from scratch |
| Configuration | Plugin options, config keys, environment variables |
| Resources | AdminHandler.Meta in full |
| Custom actions | Buttons, forms, files, confirmation |
| Authentication | check_auth, login, storage, cookies |
| Dashboard | Cards on the start page |
| Customization | Translations, CSS/JS, mutation mode, frontend build |
| API reference | Classes, options and hook signatures |
| Development | Tests, examples, docs, release |
uv sync --all-extras --dev
uv run pytest tests # tests
make lint # pyrefly + ruff
make docs # build the documentation
make example-peewee # run the Peewee exampleSee Development for the full workflow.
Issues and pull requests: https://github.com/klen/muffin-admin
MIT.
