project_config.utils.http module

HTTP/s utilities.

project_config.utils.http.GET(url: str, use_cache: bool = True, **kwargs: Any) Any[source]

Perform an HTTP/s GET request and return the result.

Parameters:
  • url (str) – URL to which the request will be targeted.

  • use_cache (bool) – Specify if the cache must be used requesting the resource.

  • **kwargs – Keyword arguments timeout and sleep passed to the internal wrapper GET function.

exception project_config.utils.http.ProjectConfigHTTPError(message: str)[source]

Bases: ProjectConfigException

HTTP error.

exception project_config.utils.http.ProjectConfigTimeoutError(message: str)[source]

Bases: ProjectConfigHTTPError

Timeout error.

project_config.utils.http._GET_impl(url: str, timeout: Optional[float] = None, sleep: float = 1.0, headers: Optional[dict[str, str]] = None) str[source]