Many tools have been written for working with PyMongo. If you know of or have created a tool for working with MongoDB from Python please list it here.
We try to keep this list current. As such, projects that have not been updated recently or appear to be unmaintained will occasionally be removed from the list or moved to the back (to keep the list from becoming too intimidating).
If a project gets removed that is still being developed or is in active use please let us know or add it back.
Some people have found that they prefer to work with a layer that has more features than PyMongo provides. Often, things like models and validation are desired. To that end, several different ORM-like layers have been written by various authors.
It is our recommendation that new users begin by working directly with PyMongo, as described in the rest of this documentation. Many people have found that the features of PyMongo are enough for their needs. Even if you eventually come to the decision to use one of these layers, the time spent working directly with the driver will have increased your understanding of how MongoDB actually works.
- Humongolus is a lightweight ORM framework for Python and MongoDB. The name comes from the combination of MongoDB and Homunculus (the concept of a miniature though fully formed human body). Humongolus allows you to create models/schemas with robust validation. It attempts to be as pythonic as possible and exposes the pymongo cursor objects whenever possible. The code is available for download at github. Tutorials and usage examples are also available at GitHub.
- The MongoKit framework is an ORM-like layer on top of PyMongo. There is also a MongoKit google group.
- Ming (the Merciless) is a library that allows you to enforce schemas on a MongoDB database in your Python application. It was developed by SourceForge in the course of their migration to MongoDB. See the introductory blog post for more details.
- MongoAlchemy is another ORM-like layer on top of PyMongo. Its API is inspired by SQLAlchemy. The code is available on github; for more information, see the tutorial.
- MongoEngine is another ORM-like layer on top of PyMongo. It allows you to define schemas for documents and query collections using syntax inspired by the Django ORM. The code is available on github; for more information, see the tutorial.
- minimongo is a lightweight, pythonic interface to MongoDB. It retains pymongo’s query and update API, and provides a number of additional features, including a simple document-oriented interface, connection pooling, index management, and collection & database naming helpers. The source is on github.
- Manga aims to be a simpler ORM-like layer on top of PyMongo. The syntax for defining schema is inspired by the Django ORM, but Pymongo’s query language is maintained. The source is on github.
- MotorEngine is a port of MongoEngine to Motor, for asynchronous access with Tornado. It implements the same modeling APIs to be data-portable, meaning that a model defined in MongoEngine can be read in MotorEngine. The source is available on github.
This section lists tools and adapters that have been designed to work with various Python frameworks and libraries.
- Django MongoDB Engine is a MongoDB database backend for Django that completely integrates with its ORM. For more information see the tutorial.
- mango provides MongoDB backends for
Django sessions and authentication (bypassing
- Django MongoEngine is a MongoDB backend for Django, an example:. For more information http://docs.mongoengine.org/en/latest/django.html
- mongodb_beaker is a project to enable using MongoDB as a backend for beaker’s caching / session system. The source is on github.
- Log4Mongo is a flexible Python logging handler that can store logs in MongoDB using normal and capped collections.
- MongoLog is a Python logging handler that stores logs in MongoDB using a capped collection.
- c5t is a content-management system using TurboGears and MongoDB.
- rod.recipe.mongodb is a ZC Buildout recipe for downloading and installing MongoDB.
- repoze-what-plugins-mongodb is a project
working to support a plugin for using MongoDB as a backend for
- mongobox is a tool to run a sandboxed MongoDB instance from within a python app.
- Flask-MongoAlchemy Add Flask support for MongoDB using MongoAlchemy.
- Flask-MongoKit Flask extension to better integrate MongoKit into Flask.
- Flask-PyMongo Flask-PyMongo bridges Flask and PyMongo.