API Submodule¶
- rfc3986.api.urlparse(uri, encoding='utf-8')¶
Parse a given URI and return a ParseResult.
This is a partial replacement of the standard library’s urlparse function.
- rfc3986.api.uri_reference(uri, encoding='utf-8')¶
Parse a URI string into a URIReference.
This is a convenience function. You could achieve the same end by using
URIReference.from_string(uri)
.
- rfc3986.api.normalize_uri(uri, encoding='utf-8')¶
Normalize the given URI.
This is a convenience function. You could use either
uri_reference(uri).normalize().unsplit()
orURIReference.from_string(uri).normalize().unsplit()
instead.