urlstd.parse.URLRecord#
- class urlstd.parse.URLRecord(scheme: str = '', username: str = '', password: str = '', host: str | int | tuple[int, ...] | None = None, port: int | None = None, path: list[str] | str = <factory>, query: str | None = None, fragment: str | None = None, blob_url_entry: str | None = None)
Bases:
object
A data class that represents a universal identifier.
Methods:
__eq__
(other)Returns True if other is equal to this object.
__str__
()Returns a string representation of a URL.
Returns True if a URL’s host is None, the empty string, or scheme is "file".
equals
(other[, exclude_fragments])Returns True if other is equal to this object.
Returns True if a URL has an opaque path.
Returns True if a URL’s username or password is not the empty string.
Returns True if a URL’s scheme is not a special scheme ("ftp", "file", "http", "https", "ws", or "wss").
Returns True if a URL’s scheme is a special scheme ("ftp", "file", "http", "https", "ws", or "wss").
Returns a string representation of a URL’s host.
Returns a string representation of a URL’s path.
serialize_url
([exclude_fragment])Returns a string representation of a URL.
Shortens a URL’s path.
Attributes:
A URL’s blob URL entry.
A URL’s fragment.
A URL’s host.
Returns a string representation of a URL.
Returns a URL’s origin or None as an opaque origin.
A URL’s password.
A URL’s port.
A URL’s query.
A URL’s scheme.
A URL’s username.
A URL’s path.