Skip to main content

Proxy around MongoDB connection that automatically handles AutoReconnect exceptions.

Project description

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:

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

MongoDBProxy-official-0.1.0.tar.gz (6.7 kB view hashes)

Uploaded Source

Built Distribution

MongoDBProxy_official-0.1.0-py3-none-any.whl (9.0 kB view hashes)

Uploaded Python 3

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