Skip to content

Instantly share code, notes, and snippets.

@theorm
Created November 26, 2012 04:10
Show Gist options
  • Save theorm/4146569 to your computer and use it in GitHub Desktop.
Save theorm/4146569 to your computer and use it in GitHub Desktop.
from mongokit import *
class MyDoc(Document):
structure = {
"bla" : {
"foo" : unicode,
"bar" : int,
},
"spam" : [],
}
connection = Connection()
col = connection['test']['mongokit']
connection.register([MyDoc])
doc = col.MyDoc()
doc.save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment