Skip to main content

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


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)

Uploaded Source

Built Distribution

easy_mongo-0.0.4-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

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

Hashes for easy_mongo-0.0.4.tar.gz
Algorithm Hash digest
SHA256 7a953b44ed3524c743b27c710070b26da5446627d20ff2e65194d06a059ee921
MD5 ab8d05ad13f8dbac4ab7cfebbb8fa281
BLAKE2b-256 6d6cb1c144e38da9756514c144b75e227e059d353ad5d33e5cbbc4ea04dadda1

See more details on using hashes here.

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

Hashes for easy_mongo-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 25d7dd8a1c248e75ebd0135b7f18dca7f4eb41b5255376c1ac383fa5b197aa29
MD5 01aafda6267ca9180994dcc376bd7869
BLAKE2b-256 bc021a1abd76048903e6abe42ea656ea47357ccac59a22333cd87d6f364b5390

See more details on using hashes here.

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