Module implementing a rate-limited multithreaded download client for downloading from Sentinel Hub service

class*, session=None, default_retry_time=30, **kwargs)[source]

Bases: DownloadClient

Download client specifically configured for download from Sentinel Hub service

  • session (SentinelHubSession | None) – If a session object is provided here then this client instance will always use only the provided session. Otherwise, it will either use a cached session or create a new session and cache it.

  • default_retry_time (float) – The default waiting time (in seconds) when retrying after getting a TOO_MANY_REQUESTS response without appropriate retry headers.

  • kwargs (Any) – Optional parameters from DownloadClient

download(*args, **kwargs)[source]

The main download method

  • args (Any) – Passed to

  • kwargs (Any) – Passed to

Return type:



Provides the session object used by the client


A Sentinel Hub session object

Return type:


static cache_session(session, universal=False)[source]

Cache a Sentinel Hub session for to be reused by all instances of SentinelHubDownloadClient and its child classes within the same Python runtime environment.

  • session (SentinelHubSession) – A session object to be cached.

  • universal (bool) – By default a session is cached for a specific OAuth user ID and Sentinel Hub deployment. But if this flag is set to True it will cache session for any OAuth user ID and deployment. The intended purpose of this parameter is that when a session is sent to a remote processing instance, which doesn’t have configured Sentinel Hub OAuth credentials, then the session can still be used even without credentials.

Return type:


static clear_cache()[source]

Clears cached sessions.

Return type: