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 details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file easy_mongo-0.0.4.tar.gz.
File metadata
- Download URL: easy_mongo-0.0.4.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a953b44ed3524c743b27c710070b26da5446627d20ff2e65194d06a059ee921
|
|
| MD5 |
ab8d05ad13f8dbac4ab7cfebbb8fa281
|
|
| BLAKE2b-256 |
6d6cb1c144e38da9756514c144b75e227e059d353ad5d33e5cbbc4ea04dadda1
|
File details
Details for the file easy_mongo-0.0.4-py3-none-any.whl.
File metadata
- Download URL: easy_mongo-0.0.4-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25d7dd8a1c248e75ebd0135b7f18dca7f4eb41b5255376c1ac383fa5b197aa29
|
|
| MD5 |
01aafda6267ca9180994dcc376bd7869
|
|
| BLAKE2b-256 |
bc021a1abd76048903e6abe42ea656ea47357ccac59a22333cd87d6f364b5390
|