SessionConfiguration#

class SessionConfiguration(client_cert_path=None, client_cert_key=None, cookies=None, headers=None, max_redirects=10, proxies=None, verify_ssl=True, cert_store_path=None, temp_folder_path=None, debug=False, safe_chars_for_path_param='', retry_count=3, request_timeout=31)#

Provides configuration for the API client session.

Parameters:
client_cert_pathstr, optional

Path to the client certificate to send with the requests. The default is None, in which case no client certificate will be sent with requests.

client_cert_keystr, optional

Key to unlock the client certificate (if required). The default is None.

cookieshttp.cookiejar.CookieJar or subclass, optional

Cookies to send with each request. The default is None.

headersdict, optional

Header values to include with each request, indexed by header name. This parameter is case-insensitive. The default is None, in which case only required headers will be included.

max_redirectsint, optional

Maximum number of redirects to allow before halting. The default is 10.

proxiesdict, optional

Proxy server URLs, indexed by resource URLs. The default is None, in which case no proxies are registered for use.

verify_sslbool, optional

Whether to verify the SSL certificate of the remote host. The default is True.

cert_store_pathstr, optional

Path to the custom certificate store in .pem format. The default is None, in which case only certificates included in the certifi package will be trusted.

temp_folder_pathstr, optional

Path to the temporary directory where downloaded files are to be stored. The default is None, in which case the user’s TEMP directory will be used.

debugbool, optional

Whether a debug log is generated. The default is False. The log include sensitives information about the authentication process.

safe_chars_for_path_paramstr, optional

Additional characters to treat as ‘safe’ when creating path parameters. For more information, see RFC 3986.

retry_countint, optional

Number of attempts to make if the API server fails to return a valid response. The default is 3.

request_timeoutint, optional

Timeout in seconds for requests to the API server. The default is 31.

Methods

SessionConfiguration.from_dict(...)

Create a SessionConfiguration object from its dictionary form.

SessionConfiguration.get_configuration_for_requests()

Retrieve the configuration as a dictionary, with keys corresponding to requests session properties.