def connect():
    engine = create_engine(get_url())

    @event.listens_for(engine, "begin")
    def do_begin(conn):
        conn.connection.create_function('regexp', 2, _re_fn)

    return engine
Return a database engine
dataset/ETHPy150Open openstack/aeromancer/aeromancer/db/connect.py/connect