Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mongodb-labs/flask-pymongo
PyMongo support for Flask applications
https://github.com/mongodb-labs/flask-pymongo
Last synced: 7 days ago
JSON representation
PyMongo support for Flask applications
- Host: GitHub
- URL: https://github.com/mongodb-labs/flask-pymongo
- Owner: mongodb-labs
- License: bsd-2-clause
- Created: 2011-12-26T15:14:22.000Z (about 13 years ago)
- Default Branch: main
- Last Pushed: 2024-11-19T13:59:27.000Z (about 1 month ago)
- Last Synced: 2024-12-24T23:45:03.043Z (10 days ago)
- Language: Python
- Homepage:
- Size: 274 KB
- Stars: 725
- Watchers: 33
- Forks: 175
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Flask-PyMongo
PyMongo support for Flask applications
## Quickstart
```python
from flask import Flask, render_template
from flask_pymongo import PyMongoapp = 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
* [Flask-PyMongo Documentation](https://flask-pymongo.readthedocs.org/)
* [PyMongo Documentation](https://pymongo.readthedocs.io/en/stable/)
* [Flask Documentation](https://flask.palletsprojects.com/)* [Quart-Motor (Motor for the Quart Framework)] (https://github.com/marirs/quart-motor)
* [Motor Non-Blocking mongodb driver for asyncio applications] (https://github.com/mongodb/motor)