Skip to main content

Overview

AsyncMongoStorage provides an asynchronous MongoDB-based storage backend. Supports both Motor (legacy) and PyMongo async (recommended) clients. Ideal for document-based applications, flexible schemas, and horizontally scalable deployments.

Install

Install the MongoDB storage optional dependency group:

Basic Usage

Parameters

When both Motor and PyMongo async are available, PyMongo async is preferred. Install using uv pip install -U 'pymongo>=4.9' (recommended) or uv pip install -U motor (legacy).