Permalink
Fetching contributors…
Cannot retrieve contributors at this time
9 lines (7 sloc) 221 Bytes
from mongoalchemy.document import Document
from mongoalchemy.fields import StringField
class A(Document):
b = StringField()
c = StringField()
a = A.unwrap({'b' : 'some val 1', 'c' : 'some val 2'})
print a.b, a.c