MongoDB Plugin for CloeePy Framework
Project description
# CloeePy-Mongo
MongoDB Plugin for CloeePy
Attaches a PyMongo DB connection to CloeePy application context
## Installation
`pip install CloeePy-Mongo`
## Configuration
```
CloeePy:
...
Plugins:
cloeepy_mongo:
host: localhost
port: 27017
username: admin
password: password
authSource: admin
authMechanism: SCRAM-SHA-1
maxPoolSize: 100
```
## Usage
```
import os
from cloeepy import CloeePy
if __name__ == "__main__":
# Required: set config path as environment variable
os.environ["CLOEEPY_CONFIG_PATH"] = "./example-config.yml"
# instantiate application instance
app = CloeePy()
# write a log entry to stdout
app.log.info("Hello World!")
# Make PyMongo call and log to stdout
app.log.info(app.mongo.admin.command("isMaster"))
```
MongoDB Plugin for CloeePy
Attaches a PyMongo DB connection to CloeePy application context
## Installation
`pip install CloeePy-Mongo`
## Configuration
```
CloeePy:
...
Plugins:
cloeepy_mongo:
host: localhost
port: 27017
username: admin
password: password
authSource: admin
authMechanism: SCRAM-SHA-1
maxPoolSize: 100
```
## Usage
```
import os
from cloeepy import CloeePy
if __name__ == "__main__":
# Required: set config path as environment variable
os.environ["CLOEEPY_CONFIG_PATH"] = "./example-config.yml"
# instantiate application instance
app = CloeePy()
# write a log entry to stdout
app.log.info("Hello World!")
# Make PyMongo call and log to stdout
app.log.info(app.mongo.admin.command("isMaster"))
```
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file CloeePy-Mongo-0.0.0-rc1.tar.gz
.
File metadata
- Download URL: CloeePy-Mongo-0.0.0-rc1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a0d7a9119e0a7de3e9117261de093dff81d148828a86eb56118da7305fc2bbd |
|
MD5 | ac50d6fb0b4628cfce410ae4aec809ae |
|
BLAKE2b-256 | 3a22c3d3755bba5f985672074f16e87efb4ad60b5a2dcdf6cbba647cc33864f1 |