ocebuild.sources._lib
#
Network helper functions.
Module Contents#
Classes#
Wrapper for urllib.request.Request to provide a nicer interface. |
Functions#
|
Simple wrapper over urlopen for skipping SSL verification. |
- class ocebuild.sources._lib.RequestWrapper(response: any)[source]#
Wrapper for urllib.request.Request to provide a nicer interface.
- __enter__() RequestWrapper [source]#
- ocebuild.sources._lib.request(url: str | urllib.request.Request, *args, **kwargs) any [source]#
Simple wrapper over urlopen for skipping SSL verification.
- Parameters:
url – The url to open.
*args – Additional arguments to pass to urlopen.
**kwargs – Additional keyword arguments to pass to urlopen.
- Raises:
HTTPError – If the url could not be retrieved.
- Returns:
The response from urlopen wrapped in a RequestWrapper class.