flask-mongoengine
Flask-MongoEngine is a Flask extension that provides integration with MongoEngine and WTF model forms.
Decision gist · record as of 2026-08-14
Yes, with conditions. Flask-MongoEngine is stable and low-friction to install, with no known vulnerabilities and a permissive license. However, it is dormant—last release 2020-11-21, last commit 2024-01-18—so it may lag behind current Flask or MongoEngine releases. Install it if you are working with a compatible Flask and MongoEngine stack; do not expect active maintenance or rapid fixes for compatibility issues.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires a running MongoDB instance; by default expects mongod on localhost:27017.
- Connection settings must be configured via app.config before or after initialization.
- Low install friction with a pure-wheel distribution.
License · maintenance · safety
BSD (permissive) — BSD license is permissive, allowing commercial and private use with minimal restrictions. You may use, modify, and distribute this package freely as long as you retain the BSD license notice.
last release 2020-11-21 (2092 days) · last repo commit 2024-01-18 · 831 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 100,126 downloads/mo, #12,999 on PyPI
Alternatives
Verify before relying
pip install flask-mongoengine
from flask import Flask
from flask_mongoengine import MongoEngine
app = Flask(__name__)
app.config['MONGODB_SETTINGS'] = {'db': 'mydb', 'host': 'localhost'}
db = MongoEngine(app)- Compatibility with current Flask and MongoEngine versions (last release 2020-11-21)
- Whether dormant status indicates unresolved issues with modern Python versions or newer dependencies
- Support for async/await patterns in modern Flask applications
What it is and what it does
Flask-MongoEngine is a Flask extension that bridges Flask applications with MongoEngine, a MongoDB object-document mapper. It manages MongoDB connections for your app, handles initialization via the extension pattern (immediate or deferred via init_app), and automatically generates WTForms from your MongoEngine document models. The package also extends MongoEngine's QuerySet with Flask-specific helpers like get_or_404, first_or_404, and pagination methods, plus optional session storage in MongoDB and debug toolbar integration.
You define your data models as MongoEngine documents, then use model_form() to automatically create WTForms from them. The extension handles field type mapping (StringField to TextAreaField, ReferenceField to SelectField, ListField to FieldList, etc.) and supports customization hints. Connection configuration is straightforward via app.config dictionaries or individual MONGODB_* settings, with support for URI-style connections and authentication.
Use it for
- Build a Flask web app with MongoDB as the primary database, letting the extension manage connections and model integration.
- Generate HTML forms automatically from MongoEngine document definitions without writing form classes manually.
- Add pagination to query results and template rendering with built-in paginate() and paginate_field() QuerySet methods.
- Store Flask sessions in MongoDB instead of memory or Redis using MongoEngineSessionInterface.
- Debug MongoDB queries in Flask-DebugToolbar by registering the MongoDebugPanel.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
Flask-MongoEngine is stable and low-friction to install, with no known vulnerabilities and a permissive license. However, it is dormant—last release 2020-11-21, last commit 2024-01-18—so it may lag behind current Flask or MongoEngine releases. Install it if you are working with a compatible Flask and MongoEngine stack; do not expect active maintenance or rapid fixes for compatibility issues.
Install
flask-mongoengine on PyPI
Before you install
Low install friction with a pure-wheel distribution. However, the package is dormant—last release was 2020-11-21 and last commit 2024-01-18—so maintenance is minimal. It still receives downloads but expect no active support for newer Flask or MongoEngine versions.
Requires a running MongoDB instance; by default expects mongod on localhost:27017. Connection settings must be configured via app.config before or after initialization.
License in practice
BSD license is permissive, allowing commercial and private use with minimal restrictions. You may use, modify, and distribute this package freely as long as you retain the BSD license notice.
Quickstart
pip install flask-mongoengine
from flask import Flask
from flask_mongoengine import MongoEngine
app = Flask(__name__)
app.config['MONGODB_SETTINGS'] = {'db': 'mydb', 'host': 'localhost'}
db = MongoEngine(app)
Verify before relying
- Compatibility with current Flask and MongoEngine versions (last release 2020-11-21)
- Whether dormant status indicates unresolved issues with modern Python versions or newer dependencies
- Support for async/await patterns in modern Flask applications
Package facts
| License | BSD permissive |
| Python support | Not specified |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesFlaskWTFormsFlask-WTFmongoengine |
| Maintenance | Dormant 2,092 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 100,126 / month, #12,999 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 4 - BetaEnvironment :: Web EnvironmentFramework :: FlaskIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Software Development :: Libraries :: Python Modules |
Evidence: flask_mongoengine-1.0.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “mongoengine flask extension”
- flask-mongoengineFlask-MongoEngine integrates MongoEngine document models with Flask,…
- Flask-AdminFlask-Admin adds a customizable admin interface to Flask applications…
- mongoengineMongoEngine provides an Object-Document Mapper (ODM) layer on top of…
Give your agent the search over MCP, or paste the wish link into any chat.
More Python Modules packages
Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.
Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.
Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.
PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.
Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.
Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.
Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…
Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.
See also mongoengine · Flask-PyMongo · marshmallow-mongoengine · Flask-WTF · WTForms-SQLAlchemy · WTForms-Alchemy · Flask-Mail · Flask-Admin · mixer · Bootstrap-Flask