Flask-PyMODM
MongoDB is a document-based database for general purpose use.
Flask-PyMODM is the bridge between Flask and PyMODM, it brings to developers a simplified way to use PyMODM in Flask applications.
Quickstart
To start using Flask-PyMODM, install or update it via pip:
pip install Flask-PyMODM
A Simple Example
from flask import Flask
from flask_pymodm import PyModm
def configure_app(app):
app.config['MONGODB_DB_NAME'] = 'test'
app.config['MONGODB_HOST'] = 'localhost'
app.config['MONGODB_PORT'] = '27017'
def create_app():
app = Flask(__name__)
configure_app(app)
PyModm(app)
return app
if __name__ == '__main__':
create_app().run(host='0.0.0.0', port=5000)
Customizing Properties
In order to customize the host, add the following into your app.config (see Configuration Handling for more details):
MONGODB_HOST = "10.10.10.13" # default is "localhost"
MONGODB_PORT = "27017" # default is "27017"
MONGODB_DB_NAME = "test" # default is "my-app"
MONGODB_ALIAS_CONNECTION = "my_connection" # default is "default"
MONGODB_USERNAME = "my_username" # default is None
MONGODB_PASSWORD = "my_password" # default is None
Test
To run test suite use the tox command.
Links
- Documentation: https://pbuzulan.github.io/flask-pymodm/
- Releases:
- Code: https://github.com/pbuzulan/flask-pymodm
- Issue tracker: https://github.com/pbuzulan/flask-pymodm/issues
- Test status:
- Test coverage:
Metadata
Release files for Flask-Pymodm 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| Flask-Pymodm-0.1.2.tar.gz | 4.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| Flask_Pymodm-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.6 kB
Release files / Flask-Pymodm-0.1.2.tar.gz
| Download URL | Flask-Pymodm-0.1.2.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
741b0b2b5b4c77a7e70d503ee484f6d5a5f2ae8f21cc9b1602097a8231fbd0f2
|
|
BLAKE2b-256 checksum How to use checksums |
a8a7ccb4c6796b22d4e143e82328003654c30b36ebe7c155b7b99b1ce6f1cbbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9
|
Release files / Flask_Pymodm-0.1.2-py3-none-any.whl
| Download URL | Flask_Pymodm-0.1.2-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3c44706f58346b1bffadb1c7c89cdf79fdbbd79bb5b87ee637d775a6f799afa8
|
|
BLAKE2b-256 checksum How to use checksums |
4a9ba9295f5bf0818ff27fb5adb7ab422a682e72d83bc49aab9d058c553682f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.9
|