betty.fetch package¶
Submodules¶
Module contents¶
Fetch content from the internet.
- exception betty.fetch.FetchError[source]¶
Bases:
UserFacingError,RuntimeErrorAn error that occurred when fetching a URL.
- class betty.fetch.FetchResponse[source]¶
Bases:
objectAn HTTP response.
- class betty.fetch.Fetcher[source]¶
Bases:
ABCFetch content from the internet.
- abstract async fetch(url: str) FetchResponse[source]¶
Fetch an HTTP resource.
- Raises:
FetchError – if an error occurred while fetching the content.
- abstract async fetch_file(url: str) Path[source]¶
Fetch a file.
- Raises:
FetchError – if an error occurred while fetching the content.
- Returns:
The path to the file on disk.