Skip to main content

Methods that simplify MongoDB collection reading and writing.

Project description

mongodb-helper

Methods that simplify MongoDB collection reading and writing.

Method Description
get_document Reads a document with the given id
update_document Updates a document with the given id
insert_document Creates a new document with the given id and data
delete_document Deletes a document with the given id

Example:

from mongodb_helper import Helper
from pymongo import MongoClient

URI = "CLUSTER URI"

cluster = MongoClient(URI)
db = cluster["database name"]
collection = db["collection name"]

helper = Helper("_id", collection)

document = helper.get_document(1122334455667788)

Project details


Release history Release notifications | RSS feed

This version

0.13

Download files

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

Source Distribution

mongodb-helper-0.13.tar.gz (3.2 kB view hashes)

Uploaded Source

Built Distribution

mongodb_helper-0.13-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

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