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

Always up-to-date session’s token

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

Provides session authorization headers

Returns:A dictionary with authorization headers
Return type:dict