OpenRoadCode
Public API reference for OpenRoadCode
Loading...
Searching...
No Matches
image.image_downloader.ImageDownloader Class Reference

Downloads image data over HTTP or HTTPS. More...

Public Member Functions

DownloadedImage download (self, str url)
 Download raw image data from a URL.

Detailed Description

Downloads image data over HTTP or HTTPS.

Member Function Documentation

◆ download()

DownloadedImage image.image_downloader.ImageDownloader.download ( self,
str url )

Download raw image data from a URL.

Parameters
urlNon-empty HTTP or HTTPS URL.
Returns
Final response URL, raw bytes, and reported content type.
Exceptions
ValueErrorif the URL is empty or uses another scheme.
ImageDownloadErrorif the request fails, the response is not an image, or the payload exceeds the configured size limit.

The documentation for this class was generated from the following file:
  • controllers/image/image_downloader.py