You want MongoKit. It is one layer of abstraction higher than PyMongo. Not sure if you're using Django, but there's also django-mongokit integration.
Example from this blog post. Note that instances of Computer can then reference make/model directly once the structure is defined ( e.g. atari.make, c64.model, ... ). No need for dictionaries:
import datetime
from mongokit import Document
class Computer(Document):
structure = {
'make': unicode,
'model': unicode,
'purchase_date': datetime.datetime,
'cpu_ghz': float,
}
validators = {
'cpu_ghz': lambda x: x > 0,
'make': lambda x: x.strip(),
}
default_values = {
'purchase_date': datetime.datetime.utcnow,
}
use_dot_notation = True
indexes = [
{'fields': ['make']},
]