Skip to main content

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"))
```

Project details


Download files

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

Files for CloeePy-Mongo, version 0.0.0-rc1
Filename, size File type Python version Upload date Hashes
Filename, size CloeePy-Mongo-0.0.0-rc1.tar.gz (3.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page