antimatter.client.configuration
#
Antimatter Public API
Interact with the Antimatter Cloud API
The version of the OpenAPI document: 1.1.3 Contact: support@antimatter.io Generated by OpenAPI Generator (https://openapi-generator.tech)
Do not edit the class manually.
Module Contents#
Classes#
This class contains various settings of the API client. |
Attributes#
- antimatter.client.configuration.JSON_SCHEMA_VALIDATION_KEYWORDS#
- class antimatter.client.configuration.Configuration(host=None, api_key=None, api_key_prefix=None, username=None, password=None, access_token=None, server_index=None, server_variables=None, server_operation_index=None, server_operation_variables=None, ssl_ca_cert=None)#
This class contains various settings of the API client.
- Parameters:
host – Base url.
api_key – Dict to store API key(s). Each entry in the dict specifies an API key. The dict key is the name of the security scheme in the OAS specification. The dict value is the API key secret.
api_key_prefix – Dict to store API prefix (e.g. Bearer). The dict key is the name of the security scheme in the OAS specification. The dict value is an API key prefix when generating the auth data.
username – Username for HTTP basic authentication.
password – Password for HTTP basic authentication.
access_token – Access token.
server_index – Index to servers configuration.
server_variables – Mapping with string values to replace variables in templated server configuration. The validation of enums is performed for variables with defined enum values before.
server_operation_index – Mapping from operation ID to an index to server configuration.
server_operation_variables – Mapping from operation ID to a mapping with string values to replace variables in templated server configuration. The validation of enums is performed for variables with defined enum values before.
ssl_ca_cert – str - the path to a file of concatenated CA certificates in PEM format.
- Example:
- property logger_file#
The logger file.
If the logger_file is None, then add stream handler and remove file handler. Otherwise, add file handler and remove stream handler.
- Parameters:
value – The logger_file path.
- Type:
str
- property debug#
Debug status
- Parameters:
value – The debug status, True or False.
- Type:
bool
- property logger_format#
The logger format.
The logger_formatter will be updated when sets logger_format.
- Parameters:
value – The format string.
- Type:
str
- property host#
Return generated host.
- server_operation_index#
Default server index
- server_operation_variables#
Default server variables
- temp_folder_path#
Temp file folder for downloading files
- refresh_api_key_hook#
function hook to refresh API key if expired
- username#
Username for HTTP basic authentication
- password#
Password for HTTP basic authentication
- access_token#
Access token
- logger#
Logging Settings
- logger_format = '%(asctime)s %(levelname)s %(message)s'#
Log format
- logger_stream_handler#
Log stream handler
- logger_file_handler#
Log file handler
- logger_file#
Debug file location
- debug = False#
Debug switch
- verify_ssl = True#
SSL/TLS verification Set this to false to skip verifying SSL certificate when calling API from https server.
- ssl_ca_cert#
Set this to customize the certificate file to verify the peer.
- cert_file#
client certificate file
- key_file#
client key file
- assert_hostname#
Set this to True/False to enable/disable SSL hostname verification.
- tls_server_name#
SSL/TLS Server Name Indication (SNI) Set this to the SNI value expected by the server.
- connection_pool_maxsize#
urllib3 connection pool’s maximum number of connections saved per pool. urllib3 uses 1 connection as default value, but this is not the best value when you are making a lot of possibly parallel requests to the same host, which is often the case here. cpu_count * 5 is used as default value to increase performance.
- proxy#
Proxy URL
- proxy_headers#
Proxy headers
- safe_chars_for_path_param = ''#
Safe chars for path_param
- retries#
Adding retries to override urllib3 default value 3
- socket_options#
Options to pass down to the underlying urllib3 socket
- datetime_format = '%Y-%m-%dT%H:%M:%SZ'#
datetime format
- date_format = '%Y-%m-%d'#
date format
- classmethod set_default(default)#
Set default instance of configuration.
It stores default configuration, which can be returned by get_default_copy method.
- Parameters:
default – object of Configuration
- classmethod get_default_copy()#
Deprecated. Please use get_default instead.
Deprecated. Please use get_default instead.
- Returns:
The configuration object.
- classmethod get_default()#
Return the default configuration.
This method returns newly created, based on default constructor, object of Configuration class or returns a copy of default configuration.
- Returns:
The configuration object.
- get_api_key_with_prefix(identifier, alias=None)#
Gets API key (with prefix if set).
- Parameters:
identifier – The identifier of apiKey.
alias – The alternative identifier of apiKey.
- Returns:
The token for api key authentication.
- get_basic_auth_token()#
Gets HTTP basic authentication header (string).
- Returns:
The token for basic HTTP authentication.
- auth_settings()#
Gets Auth Settings dict for api client.
- Returns:
The Auth Settings information dict.
- to_debug_report()#
Gets the essential information for debugging.
- Returns:
The report for debugging.
- get_host_settings()#
Gets an array of host settings
- Returns:
An array of host settings
- get_host_from_settings(index, variables=None, servers=None)#
Gets host URL based on the index and variables :param index: array index of the host settings :param variables: hash of variable and the corresponding value :param servers: an array of host settings or None :return: URL based on host settings