sentinelhub.api.batch.base

Module containing shared code of Batch Process API and Batch Statistical API

class sentinelhub.api.batch.base.BatchRequestStatus(value)[source]

Bases: Enum

An enum class with all possible batch request statuses

CREATED = 'CREATED'
ANALYSING = 'ANALYSING'
ANALYSIS_DONE = 'ANALYSIS_DONE'
PROCESSING = 'PROCESSING'
DONE = 'DONE'
FAILED = 'FAILED'
PARTIAL = 'PARTIAL'
CANCELED = 'CANCELED'
class sentinelhub.api.batch.base.BatchUserAction(value)[source]

Bases: Enum

An enum class with all possible batch user actions

START = 'START'
ANALYSE = 'ANALYSE'
NONE = 'NONE'
CANCEL = 'CANCEL'
class sentinelhub.api.batch.base.BaseBatchClient(config=None)[source]

Bases: SentinelHubService, Generic[BatchRequestType]

Class containing common methods and helper functions for Batch Client classes

Parameters

config – A configuration object with required parameters sh_client_id, sh_client_secret, and sh_auth_base_url which is used for authentication and sh_base_url which defines the service deployment that will be used.

class sentinelhub.api.batch.base.BaseBatchRequest[source]

Bases: object

Class containing helper functions for Batch Request classes

request_id: str
error: Optional[str]
status: BatchRequestStatus
to_dict()[source]

Transforms itself into a dictionary form.

Return type

Dict[str, Any]

classmethod from_dict(json_dict)[source]

Transforms itself into a dictionary form.

Parameters

json_dict (Dict[str, Any]) –

Return type

Self

raise_for_status(status=BatchRequestStatus.FAILED)[source]

Raises an error in case batch request has a given status

Parameters

status (Union[str, BatchRequestStatus, Iterable[Union[str, BatchRequestStatus]]]) – One or more status codes on which to raise an error. The default is ‘FAILED’.

Raises

RuntimeError

Return type

None