uri
uri copied to clipboard
A type to represent, query, and manipulate a Uniform Resource Identifier.
Utilize [`urllib.request.urlopen`](https://docs.python.org/3/library/urllib.request.html#urllib.request.urlopen) to implement a generic `open` method.
Example from the docs: ```python base = URI("https://example.com/about/us") cdn = base // "cdn.example.com" # https://cdn.example.com/ assert cdn == URI(str(cdn)) # boom! ```
Example from the docs: ```python from uri import URI base = URI("https://example.com/about/us") cdn = base // "cdn.example.com" cdn.relative # boom! ``` Fails with: ``` Traceback (most recent call last): File...