Skip to content

atu4403/moncoll

Repository files navigation

moncoll

Wrapper for mongodb-collection class

install

pip install moncoll

useit

from moncoll import Moncoll

settings = {"user": "testuser", "password": "testpass", "dbname": "db_test"}
coll_name = "test_collection"

coll = Moncoll(settings, coll_name)
coll.insert_one({"_id": 123})
coll.insert_one({"_id": 456})
res = coll.find()
print(res) # => [{"_id": 123}, {"_id": 456}]
coll.drop()

api

collection – Collection level operations — PyMongo documentation

Please refer to here. But there are some differences.

  1. "find" and "aggregate" return a list instead of a cursor

Related

License

MIT © atu4403

About

pythonのmongodbラッパー(pypi未登録)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages