Skip to content

Instantly share code, notes, and snippets.

@nloadholtes
Created August 13, 2016 16:01
Show Gist options
  • Save nloadholtes/5cc7671f8dee96491183902abd4fd125 to your computer and use it in GitHub Desktop.
Save nloadholtes/5cc7671f8dee96491183902abd4fd125 to your computer and use it in GitHub Desktop.
class Foo(Model):
class Meta:
# Here, we specify the database and collection names.
# A connection to your DB is automatically created.
database = "minimongo"
collection = "rocks"
foo = Foo.collection.find_one()
fname = foo.first_name
# Or...
fname = foo["first_name"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment