Skip to main content

PyMongo support for Flask applications

Project description

Flask-PyMongo

PyMongo support for Flask applications. Requires flask>=3.0 and pymongo>=4.0

Quickstart

from flask import Flask, render_template
from flask_pymongo import PyMongo

app = Flask(__name__)
app.config["MONGO_URI"] = "mongodb://localhost:27017/myDatabase"
mongo = PyMongo(app)


@app.route("/")
def home_page():
    online_users = mongo.db.users.find({"online": True})
    return render_template("index.html", online_users=online_users)

More Info

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

flask_pymongo-3.0.1.tar.gz (7.3 kB view details)

Uploaded Source

Built Distribution

flask_pymongo-3.0.1-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file flask_pymongo-3.0.1.tar.gz.

File metadata

  • Download URL: flask_pymongo-3.0.1.tar.gz
  • Upload date:
  • Size: 7.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for flask_pymongo-3.0.1.tar.gz
Algorithm Hash digest
SHA256 d225b51c21ceca2e670e6cca79b5c584ad17b96252b48e84e3b423ddb73304cc
MD5 762f00558a2e2db4d87d516d6d23eede
BLAKE2b-256 89220b3dd3989ab1636e2fb97f4760ffd858ef77eaa0e84779e2c997f6da9c04

See more details on using hashes here.

Provenance

The following attestation bundles were made for flask_pymongo-3.0.1.tar.gz:

Publisher: release-python.yml on mongodb-labs/flask-pymongo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file flask_pymongo-3.0.1-py3-none-any.whl.

File metadata

  • Download URL: flask_pymongo-3.0.1-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for flask_pymongo-3.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c75a4a9d7f4dc41ddefcfe75d2a0a259049071d285242c1338c42c64dd1223d9
MD5 2ef4a459db219c54e510b0cc56d9b039
BLAKE2b-256 6a0b5142f1b76332c0121c85a9fb5a10dce40bb10d586eea4fda3711abb6c2a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for flask_pymongo-3.0.1-py3-none-any.whl:

Publisher: release-python.yml on mongodb-labs/flask-pymongo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page