Uri#

class Uri(*args, **kwargs)#

Methods#

class Uri
build(flags: UriFlags, scheme: str, userinfo: str | None, host: str | None, port: int, path: str, query: str | None = None, fragment: str | None = None) Uri#
Parameters:
  • flags

  • scheme

  • userinfo

  • host

  • port

  • path

  • query

  • fragment

build_with_user(flags: UriFlags, scheme: str, user: str | None, password: str | None, auth_params: str | None, host: str | None, port: int, path: str, query: str | None = None, fragment: str | None = None) Uri#
Parameters:
  • flags

  • scheme

  • user

  • password

  • auth_params

  • host

  • port

  • path

  • query

  • fragment

error_quark() int#
escape_bytes(unescaped: Sequence[int], reserved_chars_allowed: str | None = None) str#
Parameters:
  • unescaped

  • reserved_chars_allowed

escape_string(unescaped: str, reserved_chars_allowed: str | None, allow_utf8: bool) str#
Parameters:
  • unescaped

  • reserved_chars_allowed

  • allow_utf8

get_auth_params() str | None#
get_flags() UriFlags#
get_fragment() str | None#
get_host() str | None#
get_password() str | None#
get_path() str#
get_port() int#
get_query() str | None#
get_scheme() str#
get_user() str | None#
get_userinfo() str | None#
is_valid(uri_string: str, flags: UriFlags) bool#
Parameters:
  • uri_string

  • flags

join(flags: UriFlags, scheme: str | None, userinfo: str | None, host: str | None, port: int, path: str, query: str | None = None, fragment: str | None = None) str#
Parameters:
  • flags

  • scheme

  • userinfo

  • host

  • port

  • path

  • query

  • fragment

join_with_user(flags: UriFlags, scheme: str | None, user: str | None, password: str | None, auth_params: str | None, host: str | None, port: int, path: str, query: str | None = None, fragment: str | None = None) str#
Parameters:
  • flags

  • scheme

  • user

  • password

  • auth_params

  • host

  • port

  • path

  • query

  • fragment

list_extract_uris(uri_list: str) list[str]#
Parameters:

uri_list

parse(uri_string: str, flags: UriFlags) Uri#
Parameters:
  • uri_string

  • flags

parse_params(params: str, length: int, separators: str, flags: UriParamsFlags) dict[str, str]#
Parameters:
  • params

  • length

  • separators

  • flags

parse_relative(uri_ref: str, flags: UriFlags) Uri#
Parameters:
  • uri_ref

  • flags

parse_scheme(uri: str) str | None#
Parameters:

uri

peek_scheme(uri: str) str | None#
Parameters:

uri

resolve_relative(base_uri_string: str | None, uri_ref: str, flags: UriFlags) str#
Parameters:
  • base_uri_string

  • uri_ref

  • flags

split(uri_ref: str, flags: UriFlags) tuple[bool, str, str, str, int, str, str, str]#
Parameters:
  • uri_ref

  • flags

split_network(uri_string: str, flags: UriFlags) tuple[bool, str, str, int]#
Parameters:
  • uri_string

  • flags

split_with_user(uri_ref: str, flags: UriFlags) tuple[bool, str, str, str, str, str, int, str, str, str]#
Parameters:
  • uri_ref

  • flags

to_string() str#
to_string_partial(flags: UriHideFlags) str#
Parameters:

flags

unescape_bytes(escaped_string: str, length: int, illegal_characters: str | None = None) Bytes#
Parameters:
  • escaped_string

  • length

  • illegal_characters

unescape_segment(escaped_string: str | None = None, escaped_string_end: str | None = None, illegal_characters: str | None = None) str | None#
Parameters:
  • escaped_string

  • escaped_string_end

  • illegal_characters

unescape_string(escaped_string: str, illegal_characters: str | None = None) str | None#
Parameters:
  • escaped_string

  • illegal_characters