def get_database(dialect):
    aliases = {
        ('mysql',): 'mysql',
        ('sqlite',): 'sqlite',
        ('pgsql', 'postgres', 'postgresql'): 'postgresql',
    }

    dialect = next((aliases[alias] for alias in aliases if dialect in alias), dialect)
    names = [str(mod[1]) for mod in pkgutil.iter_modules([os.path.join(os.path.dirname(__file__), dialect)])]

    try:
        return __import__('{0}'.format(dialect), globals(), level=1, fromlist=names)
    except ImportError:
        raise DatabaseError(
            current=dialect,
            allowed=[name for _, name, is_pkg in pkgutil.iter_modules([os.path.dirname(__file__)]) if is_pkg])
An observer which triggers a compiled view refresh.
dataset/ETHPy150Open maxtepkeev/architect/architect/databases/utilities.py/get_database--crossover with--dataset/ETHPy150Open ContinuumIO/ashiba/enaml/enaml/applib/live_editor_model.py/LiveEditorModel._refresh_view_trigger