mongodb - create mongo connection handler with python -
How to write mongo connection handlers with pongo? I want to ask for a connection to all the modules in my program. I mean use pymongo MongoClient for example and write handler for it.
For example in your application anywhere, such as a Example: and then __ init __.py and then import that object wherever you want it to be used. Customer enforces connection pooling, so you should be correct without writing any additional handlers.
ap / __init__.py db = Mongo client ()
App / ModuleApplication DB
Comments
Post a Comment