8000 GitHub - wixb50/MongoDBProxy: Proxy around MongoDB connection that automatically handles AutoReconnect-exceptions.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Proxy around MongoDB connection that automatically handles AutoReconnect-exceptions.

Notifications You must be signed in to change notification settings

wixb50/MongoDBProxy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MongoDBProxy

MongoDBProxy is used to create a proxy around a MongoDB-connection in order to automatically handle AutoReconnect-exceptions. You use MongoDBProxy in the same way you would an ordinary MongoDB-connection but don't need to worry about handling AutoReconnects by yourself.

Usage:

>>> import pymongo
>>> import mongo_proxy
>>> safe_conn = mongo_proxy.MongoProxy(pymongo.MongoReplicaSetClient(replicaSet='blog_rs')
>>> safe_conn.blogs.posts.insert(post)  # Automatically handles AutoReconnect.

See here for more details: http://www.arngarden.com/2013/04/29/handling-mongodb-autoreconnect-exceptions-in-python-using-a-proxy/

Contributors:

About

Proxy around MongoDB connection that automatically handles AutoReconnect-exceptions.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%
0