create_session#

ansys.hps.client.connection.create_session(access_token=None, verify=True, disable_security_warnings=False, auth_header_name='Authorization', auth_prefix='Bearer')#

Get the requests.Session object configured for HPS with a given access token.

Return type:

Session

Parameters:
access_tokenstr

Access token provided by the ansys.hps.client.auth.authenticate() method.

verify: Union[bool, str], optional

If a Boolean, whether to verify the server’s TLS certificate. The default is True. If a string, the path to the CA bundle to use. For more information, see the requests.Session documentation.

disable_security_warnings: bool, optional

Whether to disable warnings about insecure HTTPS requests. The default is False.

auth_header_namestr, optional

Header name used for forwarding the token. The default is "Authorization".

auth_prefixstr, optional

Authentication prefix prepended to the token value. The default is "Bearer". If empty, the token is forwarded without prefix.

Returns:
requests.Session

Session object.