sentinelhub.aws.batch

Module implementing utilities for collecting data, produced with Sentinel Hub Statistical Batch API, from an S3 bucket.

class sentinelhub.aws.batch.AwsBatchStatisticalResults(batch_request, *, feature_ids=None, data_folder=None, config=None)[source]

Bases: DataRequest

A utility class for downloading results of Batch Statistical API from an S3 bucket.

Parameters
  • batch_request (Union[str, dict, BatchStatisticalRequest]) – Info about a batch request - either an instance of BatchStatisticalRequest or a batch ID or a raw payload of the batch response.

  • feature_ids (Optional[Sequence[Union[str, int]]]) – A list of feature IDs of saved results on the bucket. If provided it will download only these results. If not provided it will collect the names of all JSON files from results folder on the bucket and download all of them. Note that it is recommended that you provide this parameter otherwise this class will have to make additional requests to the S3 bucket in order to list all features from the folder.

  • data_folder (Optional[str]) – Directory to which the files should be saved.

  • config (Optional[SHConfig]) – A config object that contains AWS credentials to access the S3 bucket with results.

create_request()[source]

Creates a list of download requests.

Return type

None

class sentinelhub.aws.batch.AwsBatchResults(*args, **kwargs)[source]

Bases: AwsBatchStatisticalResults

Deprecated version of AwsBatchStatisticalResults.

Parameters
  • batch_request – Info about a batch request - either an instance of BatchStatisticalRequest or a batch ID or a raw payload of the batch response.

  • feature_ids – A list of feature IDs of saved results on the bucket. If provided it will download only these results. If not provided it will collect the names of all JSON files from results folder on the bucket and download all of them. Note that it is recommended that you provide this parameter otherwise this class will have to make additional requests to the S3 bucket in order to list all features from the folder.

  • data_folder – Directory to which the files should be saved.

  • config – A config object that contains AWS credentials to access the S3 bucket with results.

  • args (Any) –

  • kwargs (Any) –