Implementation of base Sentinel Hub interfaces

class sentinelhub.api.base_request.SentinelHubBaseApiRequest(download_client_class, *, data_folder=None, config=None)[source]

Bases: DataRequest

A base class for Sentinel Hub interfaces

  • download_client_class (Callable) – A class implementing a download client

  • data_folder (Optional[str]) – location of the directory where the fetched data will be saved.

  • config (Optional[SHConfig]) – A custom instance of config class to override parameters from the saved configuration.

payload: Dict[str, Any] = {}
abstract property mime_type: MimeType

The mime type of the request.


Prepares a download request

Return type


static input_data(data_collection, *, identifier=None, time_interval=None, maxcc=None, mosaicking_order=None, upsampling=None, downsampling=None, other_args=None)[source]

Generate the input data part of the request body

  • data_collection (DataCollection) – One of supported Process API data collections.

  • identifier (Optional[str]) – A collection identifier that can be referred to in the evalscript. Parameter is referenced as “id” in service documentation. To learn more check data fusion documentation.

  • time_interval (Optional[Tuple[Union[None, str, date], Union[None, str, date]]]) – A time interval with start and end date of the form YYYY-MM-DDThh:mm:ss or YYYY-MM-DD or a datetime object

  • maxcc (Optional[float]) – Maximum accepted cloud coverage of an image. Float between 0.0 and 1.0. Default is 1.0.

  • mosaicking_order (Optional[MosaickingOrder]) – Mosaicking order, which has to be either ‘mostRecent’, ‘leastRecent’ or ‘leastCC’.

  • upsampling (Optional[ResamplingType]) – A type of upsampling to apply on data

  • downsampling (Optional[ResamplingType]) – A type of downsampling to apply on data

  • other_args (Optional[Dict[str, Any]]) – Additional dictionary of arguments. If provided, the resulting dictionary will get updated by it.


A dictionary-like object that also contains additional attributes

Return type


static bounds(bbox=None, geometry=None, other_args=None)[source]

Generate a bound part of the API request

  • bbox (Optional[BBox]) – Bounding box describing the area of interest.

  • geometry (Optional[Geometry]) – Geometry describing the area of interest.

  • other_args (Optional[Dict[str, Any]]) – Additional dictionary of arguments. If provided, the resulting dictionary will get updated by it.

Return type

Dict[str, Any]

class sentinelhub.api.base_request.InputDataDict(input_data_dict, *, service_url=None)[source]

Bases: dict

An input data dictionary which also holds additional attributes

  • input_data_dict (Dict[str, Any]) – A normal dictionary with input parameters

  • service_url (Optional[str]) – A service URL defined by a data collection