Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tonytan4ever/d23eca160a258fa4ed311cbaa2e3f1b4 to your computer and use it in GitHub Desktop.
Save tonytan4ever/d23eca160a258fa4ed311cbaa2e3f1b4 to your computer and use it in GitHub Desktop.
client = MongoClient(**kwargs)
db = client[conf['NAME']]
if conf['USER']:
db.authenticate(
conf['USER'],
conf['PASSWORD'])
collection = db['sensor_data']
collection.find({})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment