Installation

Requirements

  • Python 3.10 or newer

  • MongoDB 5.0+ (local, Docker, or Atlas)

  • FastAPI application

Install the package

Using uv (recommended):

uv add fastapi-mongo-admin

Using pip:

pip install fastapi-mongo-admin

Development install

Clone the repository and install with dev dependencies:

git clone https://github.com/tushortz/fastapi-mongo-admin.git
cd fastapi-mongo-admin
uv sync --group dev

Documentation dependencies (optional):

uv sync --extra docs

The published PyPI package includes only fastapi_mongo_admindocs/ and example/ are excluded from the wheel and source distribution.

Core dependencies (installed automatically):

Package

Purpose

fastapi

Web framework and routing

motor

Async MongoDB driver

pymongo

Sync MongoDB driver

pydantic

Model validation and schema inference

jinja2

Server-rendered admin templates

python-multipart

Form data parsing

Optional: MongoDB via Docker

For local development, start MongoDB with the included compose file:

docker compose -f example/docker-compose.yml up -d

Verify the connection:

mongosh mongodb://localhost:27017

Next steps

Continue to Quick Start to mount the admin in your FastAPI application.