class importlib.abc.ResourceLoader
An abstract base class for a loader which implements the optional PEP 302 protocol for loading arbitrary resources from the storage back-end.
-
abstractmethod get_data(path)
-
An abstract method to return the bytes for the data located at path. Loaders that have a file-like storage back-end that allows storing arbitrary data can implement this abstract method to give direct access to the data stored.
OSError
is to be raised if the path cannot be found. The path is expected to be constructed using a module’s__file__
attribute or an item from a package’s__path__
.Changed in version 3.4: Raises
OSError
instead ofNotImplementedError
.
Please login to continue.