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.

Source Distribution

CloeePy-Mongo-0.0.0-rc2.tar.gz (3.6 kB view details)

Uploaded Source

File details

Details for the file CloeePy-Mongo-0.0.0-rc2.tar.gz.

File metadata

File hashes

Hashes for CloeePy-Mongo-0.0.0-rc2.tar.gz
Algorithm Hash digest
SHA256 c7e2d97d8161e24986ea228dc2a7012440d8c5ae163c3f390d4c01cef452ac2f
MD5 80c465ee040499cc1f4bcd9af649dffa
BLAKE2b-256 e0759e6e38afbb6ca9f08bf1008f0ed7e4a13f3f3325ec2bf6d134ebe001eab8

See more details on using hashes here.

Provenance

Supported by

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