def init_model(connection):
    raw_db = getattr(connection, config.get('mongodb.db', 'anygit'))
    db = getattr(connection, config.get('mongodb.db', 'anygit'))
    # Transform
    db.add_son_manipulator(TransformObject())

    for obj in globals().itervalues():
        if type(obj) == type and issubclass(obj, MongoDbModel) and hasattr(obj, '__tablename__'):
            save_classes.append(obj)
            tablename = getattr(obj, '__tablename__')
            obj._object_store = getattr(db, tablename)
            obj._raw_object_store = getattr(raw_db, tablename)
            collection_to_class[obj._object_store] = obj
Notify user from external event
dataset/ETHPy150Open ebroder/anygit/anygit/backends/mongodb.py/init_model--crossover with--dataset/ETHPy150Open OpenCobolIDE/OpenCobolIDE/open_cobol_ide/extlibs/pyqode/core/modes/filewatcher.py/FileWatcherMode._notify