Skip to content

Proxy around MongoDB connection that automatically handles AutoReconnect-exceptions.

Notifications You must be signed in to change notification settings

appsembler/MongoDBProxy

This branch is 4 commits behind openedx/MongoDBProxy:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

77fc125 · Sep 27, 2024

History

77 Commits
Jul 21, 2024
Jun 14, 2022
Dec 3, 2013
Jun 18, 2020
Jun 14, 2022
Apr 1, 2014
Jun 4, 2024
Aug 21, 2020
Jun 18, 2020
Sep 26, 2024
Jan 12, 2021
Jan 12, 2021

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 mongodb_proxy

safe_conn = mongodb_proxy.MongoProxy(pymongo.MongoReplicaSetClient(replicaSet='blog_rs')

safe_conn.blogs.posts.insert(post)

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

Contributors:

Jonathan Kamens (https://github.com/jikamens)

Michael Cetrulo (https://github.com/git2samus)

Richard Frank (https://github.com/richafrank)

David Lindquist (https://github.com/dlindquist)

About

Proxy around MongoDB connection that automatically handles AutoReconnect-exceptions.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 93.2%
  • Makefile 6.8%