easy to use mongo(kb)
Project description
Easy to use python mongo(for kb first)
pymongo Reference: https://pymongo.readthedocs.io/en/3.10.0/tutorial.html
Quick Start
Installation: pip install easy_mongo
1.config
Edit conf/conf.yml
mongo: # mongo config host: 127.0.0.1 port: 27017 name: db_name password: password # blank if not require
2.demo
from easy_mongo.mongo import EasyMongo def demo_mongo(): easy_mongo = EasyMongo('../conf/conf.yml') col = easy_mongo.get_collection('country') # get first 10 items # reference pymongo for item in col.find().limit(10): print(item) if __name__ == '__main__': demo_mongo()
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
easy_mongo-0.0.4.tar.gz
(2.5 kB
view hashes)
Built Distribution
Close
Hashes for easy_mongo-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25d7dd8a1c248e75ebd0135b7f18dca7f4eb41b5255376c1ac383fa5b197aa29 |
|
MD5 | 01aafda6267ca9180994dcc376bd7869 |
|
BLAKE2b-256 | bc021a1abd76048903e6abe42ea656ea47357ccac59a22333cd87d6f364b5390 |