sentinelhub_session

Module implementing Sentinel Hub session object

class sentinelhub.sentinelhub_session.SentinelHubSession(config=None)[source]

Bases: object

Sentinel Hub authentication class

The class will do OAuth2 authentication with Sentinel Hub service and store the token. It will make sure that the token is never expired by automatically refreshing it if expiry time is close.

Parameters:config (SHConfig) – An instance of package configuration class
token

Always up-to-date session’s token

Returns:A token in a form of dictionary of parameters
Return type:dict
session_headers

Provides session authorization headers

Returns:A dictionary with authorization headers
Return type:dict