Skip to content

Instantly share code, notes, and snippets.

@danared
Created April 3, 2015 20:21
Show Gist options
  • Save danared/d260c3b902ef2c7009bb to your computer and use it in GitHub Desktop.
Save danared/d260c3b902ef2c7009bb to your computer and use it in GitHub Desktop.
db = client.get_database("dbname", read_preference=ReadPreference.SECONDARY)
# Unblocks when a secondary is found.
db.collection.find_one()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment