URIHandler

class URIHandler(*args, **kwargs)

The URIHandler is an interface that is implemented by Source and Sink Element to unify handling of URI.

An application can use the following functions to quickly get an element that handles the given URI for reading or writing (make_from_uri()).

Source and Sink plugins should implement this interface when possible.

Methods

class URIHandler
get_protocols() list[str] | None

Gets the list of protocols supported by handler. This list may not be modified.

get_uri() str | None

Gets the currently handled URI.

get_uri_type() URIType

Gets the type of the given URI handler

set_uri(uri: str) bool

Tries to set the URI of the given handler.

Parameters:

uri – URI to set

Virtual Methods

class URIHandler
do_get_uri() str | None

Gets the currently handled URI.

do_set_uri(uri: str) bool

Tries to set the URI of the given handler.

Parameters:

uri – URI to set