MongoDB with Python
Build cutting-edge applications with Python and MongoDB, from dynamic modern web applications to Gen-AI systems and data science projects. MongoDB's scalable cloud database infrastructure ensures your solutions are robust and optimized for performance.
As of May 14, 2025, Motor is deprecated in favor of the GA release of the PyMongo Async API in the PyMongo library. We will not add new features to Motor, and we will provide only bug fixes until it reaches end of life on May 14, 2026. After that, we will fix only critical bugs until final support ends on May 14, 2027. We strongly recommend migrating to the PyMongo Async API while Motor is still supported.
For more information about migrating, see the Migrate to PyMongo Async guide in the PyMongo documentation.
Driver
Provides a synchronous and asynchronous API for working with MongoDB databases consistent with other MongoDB language drivers.
Frameworks
Configure connections to different databases or clusters, store and retrieve objects, or use MongoDB as a data store.

Django MongoDB Backend

FastAPI

Flask
Community built ODMs (ORMs for Document Database):
Libraries and Extensions
Integrations

LangChain
LangGraph

LlamaIndex

Microsoft Semantic Kernel

HayStack

DocArray

ChatGPT Retrieval Plugin
More Ways to Learn

Take the Python Associate Developer Exam
Python Associate Developer Exam →
View Python developer resources
Python Resources →
Learn about Python and MongoDB
Python Developer Path →
Join forums and discussions
MongoDB Community →