wasat.uri
Gemini URI representation and parsing.
GeminiURI
Represents a validated Gemini protocol URI.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str | Self
|
The raw URI string or an existing GeminiURI to clone. |
required |
Raises:
| Type | Description |
|---|---|
URIError
|
If the URI is invalid or has an incorrect scheme. |
resolve
resolve(relative_uri: str) -> Self
Resolve a relative URI string against this URI as a base.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
str
|
The relative or absolute target URI string. |
required |
Returns:
| Type | Description |
|---|---|
Self
|
A new GeminiURI representing the resolved target. |
Raises:
| Type | Description |
|---|---|
URIError
|
If the resolved URI is invalid. |