$npx skillfedfor your agent

Flask-PyMongo

PyMongo support for Flask applications

Worth itPyPI Python ModulesReleased Jan 2025228.0K downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — flask_pymongo-3.0.1-py3-none-any.whl
v3.0.1 · released 2025-01-29 · Python >=3.9 · 2 runtime deps: flask, pymongo

Yes. Flask-PyMongo is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive BSD license. Install it if you are building a Flask application that needs MongoDB support and prefer a lightweight, direct integration over an ORM. If you need async support, consider Motor instead.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires a running MongoDB instance accessible at the URI specified in MONGO_URI config.
  • Low install friction with a pure-Python wheel.
  • Maintenance is active with a recent commit on 2026-08-12 and steady releases; the project has 721 stars and requires flask>=3.0 and pymongo>=4.0.

License · maintenance · safety

permissive license (permissive) — BSD License (permissive). You may use, modify, and distribute this package freely in commercial and private projects, provided you retain the copyright notice and disclaimer.

last release 2025-01-29 (562 days) · last repo commit 2026-08-12 · 721 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 228,000 downloads/mo, #9,159 on PyPI

Verify before relying

pip install Flask-PyMongo

from flask import Flask
from flask_pymongo import PyMongo

app = Flask(__name__)
app.config["MONGO_URI"] = "mongodb://localhost:27017/myDatabase"
mongo = PyMongo(app)
users = mongo.db.users.find({"online": True})
  • Whether connection pooling and timeout behavior are configurable beyond the MONGO_URI.
  • Support for MongoDB Atlas or other cloud-hosted instances beyond local connections.
  • Async/await support or whether it is synchronous-only.
Same gist for agents: .md · .json

What it is and what it does

Flask-PyMongo is a Flask extension that wraps PyMongo to simplify MongoDB integration in Flask applications. It initializes a PyMongo instance configured through Flask's app.config, exposing the MongoDB connection and database objects as attributes of the extension object. You configure it with a MONGO_URI connection string and then access collections and perform queries directly through the mongo object in your route handlers and application code.

The package is designed for synchronous Flask applications that need straightforward MongoDB access without additional abstraction layers. It requires Flask 3.0 or later and PyMongo 4.0 or later, and supports Python 3.9 through 3.13 on CPython and PyPy. The extension handles connection lifecycle management within Flask's application context.

Use it for

  • Building Flask web applications that store and retrieve user data, posts, or other documents in MongoDB.
  • Querying MongoDB collections directly in Flask route handlers to render dynamic HTML templates.
  • Managing MongoDB connections across multiple Flask blueprints and request handlers.
  • Prototyping or developing small-to-medium Flask applications with document-oriented data models.
  • Integrating MongoDB into existing Flask projects that previously used SQL databases.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

Flask-PyMongo is actively maintained, has low install friction, carries no known vulnerabilities, and uses a permissive BSD license. Install it if you are building a Flask application that needs MongoDB support and prefer a lightweight, direct integration over an ORM. If you need async support, consider Motor instead.

Install

flask-pymongo on PyPI

Before you install

Low install friction with a pure-Python wheel. Maintenance is active with a recent commit on 2026-08-12 and steady releases; the project has 721 stars and requires flask>=3.0 and pymongo>=4.0.

Requires a running MongoDB instance accessible at the URI specified in MONGO_URI config.

License in practice

BSD License (permissive). You may use, modify, and distribute this package freely in commercial and private projects, provided you retain the copyright notice and disclaimer.

Quickstart

pip install Flask-PyMongo

from flask import Flask
from flask_pymongo import PyMongo

app = Flask(__name__)
app.config["MONGO_URI"] = "mongodb://localhost:27017/myDatabase"
mongo = PyMongo(app)
users = mongo.db.users.find({"online": True})

Verify before relying

  • Whether connection pooling and timeout behavior are configurable beyond the MONGO_URI.
  • Support for MongoDB Atlas or other cloud-hosted instances beyond local connections.
  • Async/await support or whether it is synchronous-only.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
flaskpymongo
MaintenanceActively maintained 562 days since the last release
Last repo commit
First released
Downloads228,000 / month, #9,159 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Environment :: Web EnvironmentFramework :: FlaskIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Internet :: WWW/HTTP :: Dynamic ContentTopic :: Software Development :: Libraries :: Python Modules

Evidence: flask_pymongo-3.0.1-py3-none-any.whl

Tags

Capabilities
flask mongodb integrationpymongo flask extensionmongodb flask ormflask database adaptermongo db connection flaskflask pymongo drivermongodb flask support
Topics
flask-extensionmongodb-driverdatabase-integration

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 › “flask mongodb integration”

  • Flask-PyMongoFlask-PyMongo integrates MongoDB database access into Flask…
  • flask-mongoengineFlask-MongoEngine integrates MongoEngine document models with Flask,…
  • Flask-SessionFlask-Session adds server-side session storage to Flask applications,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

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.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

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.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

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.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

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…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also pymongo · pymongoexplain · djongo · flask-mongoengine · pymongoarrow · pymongo_inmemory · pymongo-auth-aws · pydantic-mongo · pymongo-search-utils · pymongocrypt