def add_object ( self , object ) : if object . id is None : object . get_id ( ) self . db . engine . save ( object )
store python object in mongodb
Add object to db session . Only for session - centric object - database mappers .
def add_object(self, object):
        """Add object to db session. Only for session-centric object-database mappers."""
        if object.id is None:
            object.get_id()
        self.db.engine.save(object)