project_config.fetchers package
Fetchers for different types of resources by URI schema.
- exception project_config.fetchers.FetchError(message: str)[source]
Bases:
ProjectConfigException
Error happened during the fetching of a resource.
- exception project_config.fetchers.SchemeProtocolNotImplementedError(scheme: str, action: str = 'Fetching')[source]
Bases:
ProjectConfigNotImplementedError
A URI schema has not been implemented.
- project_config.fetchers._get_scheme_from_urlparts(url_parts: SplitResult) str [source]
- project_config.fetchers.download_file_from_urlsplit_scheme(url: str, url_parts: SplitResult, scheme: str, **kwargs: Any) str [source]
Download a file from a URL knowing its scheme.
- project_config.fetchers.fetch(url: str, **kwargs: Any) Any [source]
Fetch a result given an URI.
- Parameters:
url (str) – The URL of the resource to fetch.
**kwargs – Extra arguments to pass to the fetcher.
- project_config.fetchers.resolve_maybe_relative_url(url: str, parent_url: str, rootdir: str) str [source]
Relative URL resolver.
- project_config.fetchers.resolve_url(url: str) tuple[str, str] [source]
Resolve an URL from a custom URI to their real counterpart.
- project_config.fetchers.uri_is_pointing_to_local_file(uri: str) bool [source]
Return True if an URI is pointing to a local file.
- project_config.fetchers.urlsplit_with_scheme(url: str) tuple[urllib.parse.SplitResult, str] [source]
Return a tuple with the URL parts and the scheme.