def _parse_rfc1738_args(name):
    # from SQLAlchemy lib/sqlalchemy/engine/url.py
    # MIT licensed
    pattern = re.compile(r'''
            (?P<name>\w+)://
            (?:
                (?P<user>[^:/]*)
                (?::(?P<password>[^/]*))?
            @)?
            (?:
                (?P<host>[^/:]*)
                (?::(?P<port>[^/]*))?
            )?
            (?:/(?P<db>.*))?
            '''
            , re.X)

    m = pattern.match(name)
    if m is not None:
        components = m.groupdict()
        if components['db'] is not None:
            tokens = components['db'].split('?', 2)
            components['db'] = tokens[0]
            query = (len(tokens) >= 1 and dict(cgi.parse_qsl(tokens[1]))) or None
            if query is not None:
                query = dict((k.encode('ascii'), query[k]) for k in query)
        else:
            query = None
        components['query'] = query

        if components['password'] is not None:
            components['password'] = urllib.unquote_plus(components['password'])

        return Options(**components)
    else:
        raise ValueError(
            "Could not parse rfc1738 URL from string '%s'" % name)
dataset/ETHPy150Open omniscale/imposm/imposm/db/config.py/_parse_rfc1738_args/operator `>` -> `>=`