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_path
str
,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_key
str
,optional
Key to unlock the client certificate (if required). The default is
None
.- cookies
http.cookiejar.CookieJar
orsubclass
,optional
Cookies to send with each request. The default is
None
.- headers
dict
,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_redirects
int
,optional
Maximum number of redirects to allow before halting. The default is
10
.- proxies
dict
,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_path
str
,optional
Path to the custom certificate store in
.pem
format. The default isNone
, in which case only certificates included in thecertifi
package will be trusted.- temp_folder_path
str
,optional
Path to the temporary directory where downloaded files are to be stored. The default is
None
, in which case the user’sTEMP
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_param
str
,optional
Additional characters to treat as ‘safe’ when creating path parameters. For more information, see RFC 3986.
- retry_count
int
,optional
Number of attempts to make if the API server fails to return a valid response. The default is
3
.- request_timeout
int
,optional
Timeout in seconds for requests to the API server. The default is
31
.
- client_cert_path
Methods
Create a
SessionConfiguration
object from its dictionary form.Retrieve the configuration as a dictionary, with keys corresponding to
requests
session properties.