jschon.uri

class jschon.uri.URI(value)
Parameters

value (str) –

Return type

None

__init__(value)
Parameters

value (str) –

Return type

None

copy(scheme=True, authority=True, path=True, query=True, fragment=True)

Produce a new URI composed of the specified components of self.

  • True => use existing

  • False/None => remove

  • Otherwise => replace

Return type

jschon.uri.URI

has_absolute_base()
Return type

bool

is_absolute()
Return type

bool

resolve(base_uri)

Produce a new URI by resolving self against the given base URI.

Parameters

base_uri (jschon.uri.URI) –

Return type

jschon.uri.URI

validate(require_scheme=False, require_normalized=False, allow_fragment=True, allow_non_empty_fragment=True)

Validate self.

Raises

URIError – if self fails validation

Parameters
  • require_scheme (bool) –

  • require_normalized (bool) –

  • allow_fragment (bool) –

  • allow_non_empty_fragment (bool) –

Return type

None

property authority: str
property fragment: str
property path: str
property query: str
property scheme: str