sentinelhub.download.sentinelhub_client
Module implementing a rate-limited multithreaded download client for downloading from Sentinel Hub service
- class sentinelhub.download.sentinelhub_client.SentinelHubDownloadClient(*, session=None, **kwargs)[source]
Bases:
DownloadClient
Download client specifically configured for download from Sentinel Hub service
- Parameters:
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.
kwargs (Any) – Optional parameters from DownloadClient
- get_session()[source]
Provides the session object used by the client
- Returns:
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.
- Parameters:
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:
None