Skip to content

Instantly share code, notes, and snippets.

@igr-santos
Created June 26, 2014 18:56
Show Gist options
  • Save igr-santos/a787988461eb97446510 to your computer and use it in GitHub Desktop.
Save igr-santos/a787988461eb97446510 to your computer and use it in GitHub Desktop.
Sample handling MongoDB with Python
from pymongo import MongoClient
# Connect client MongoDB and database
client = MongoClient()
database = client['database_name']
# or
database = MongoClient().database_name
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment