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
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)
Built Distribution
Close
Hashes for mongodb_helper-0.13-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e892ce63c51d019f38e47b9622d8ec7c74177ddfb9290aef3e39c3c16c496a7b |
|
MD5 | 6b7459d833826f8315f9481e5ea9e165 |
|
BLAKE2b-256 | 179b281511764923893ec1c9de712e4a9bfd22528b92bd51ac14542362081625 |