FastAPI Mongo Admin

FastAPI Mongo Admin is a Django-inspired, server-rendered admin framework for FastAPI and MongoDB. It provides a full ModelAdmin configuration API, pluggable authentication, list filters, bulk actions, Pydantic-driven forms, and support for both async (Motor) and sync (PyMongo) database backends.

Version 2.0.2

Key capabilities

  • Django-like registrysite.register(Model, AdminClass)

  • Server-rendered UI — Jinja2 + HTMX changelist, add/change forms, delete confirmation

  • List filters — choice, boolean, date, related, and custom ListFilter classes

  • Pydantic forms — validation and widget inference from your models

  • Field mapping — translate between model field names and legacy MongoDB keys

  • Pluggable auth — wire any FastAPI Depends authentication/authorization

  • Sync + asyncmode="async" (Motor) or mode="sync" (PyMongo)

  • Customization — template overrides, hooks, custom admin views

  • JSON API/admin/api/{collection}/ (read-only by default; optional api_write_methods for CRUD + Swagger)

  • i18n + themes — 9 languages, light/dark mode with cookie persistence

  • Date/time display — formatted changelist and readonly values (default 8 Apr 2026, 7:32pm)

  • Save notifications — changelist success banner after add/change using the saved item label

  • Nested models — nested Pydantic models via JSON editor with validation

Indices and tables