project_config.fetchers package

Fetchers for different types of resources by URI schema.

exception project_config.fetchers.FetchError(message: str)[source]

Bases: project_config.exceptions.ProjectConfigException

Error happened during the fetching of a resource.

message: str
exception project_config.fetchers.SchemeProtocolNotImplementedError(scheme: str, action: str = 'Fetching')[source]

Bases: project_config.exceptions.ProjectConfigNotImplementedError

A URI schema has not been implemented.

message: str
project_config.fetchers._get_scheme_from_urlparts(url_parts: urllib.parse.SplitResult) str[source]
project_config.fetchers.fetch(url: str, **kwargs: Any) Dict[str, Any][source]

Fetch a result given an URI.

Parameters

url (str) – The URL of the resource to fetch.

project_config.fetchers.resolve_maybe_relative_url(url: str, parent_url: str, rootdir: str) str[source]

Relative URL resolver.

Parameters
  • url (str) – URL or relative URI to the target resource.

  • parent_url (str) – Absolute URI of the origin resource, which acts as the requester.

Returns

Absolute URI for the children resource.

Return type

str

project_config.fetchers.resolve_url(url: str) Tuple[str, str][source]

Resolve an URL from a custom URI to their real counterpart.

Parameters

url (str) – URI to the target resource.

Returns

Real URL for the target resource and scheme.

Return type

tuple

Submodules