configuration module

Configuration

class edgeimpulse_api.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
)

Parameters

  • 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

Instance variables

  • access_token Access token

  • assert_hostname Set this to True/False to enable/disable SSL hostname verification.

  • cert_file client certificate file

  • 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.

  • debug Debug switch

  • host Return generated host.

  • key_file client key file

  • logger Logging Settings

  • logger_file Debug file location

  • logger_file_handler Log file handler

  • logger_format Log format

  • logger_stream_handler Log stream handler

  • password Password for HTTP basic authentication

  • proxy Proxy URL

  • proxy_headers Proxy headers

  • refresh_api_key_hook function hook to refresh API key if expired

  • retries Adding retries to override urllib3 default value 3

  • safe_chars_for_path_param Safe chars for path_param

  • server_operation_index Default server index

  • server_operation_variables Default server variables

  • socket_options Options to pass down to the underlying urllib3 socket

  • ssl_ca_cert Set this to customize the certificate file to verify the peer.

  • temp_folder_path Temp file folder for downloading files

  • username Username for HTTP basic authentication

  • verify_ssl SSL/TLS verification Set this to false to skip verifying SSL certificate when calling API from https server.

Static methods

get_default

edgeimpulse_api.configuration.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.

get_default_copy

edgeimpulse_api.configuration.get_default_copy(
		
)

Deprecated. Please use get_default instead.

Deprecated. Please use get_default instead.

set_default

edgeimpulse_api.configuration.set_default(
		default
)

Set default instance of configuration.

It stores default configuration, which can be returned by get_default_copy method.

Parameters

  • default

Methods

auth_settings

edgeimpulse_api.configuration.auth_settings(
		self
)

Gets Auth Settings dict for api client.

Parameters

  • self

get_api_key_with_prefix

edgeimpulse_api.configuration.get_api_key_with_prefix(
		self,
		identifier,
		alias=None
)

Gets API key (with prefix if set).

Parameters

  • self

  • identifier

  • alias=None

get_basic_auth_token

edgeimpulse_api.configuration.get_basic_auth_token(
		self
)

Gets HTTP basic authentication header (string).

Parameters

  • self

get_host_from_settings

edgeimpulse_api.configuration.get_host_from_settings(
		self,
		index,
		variables=None,
		servers=None
)

Gets host URL based on the index and variables

Parameters

  • self

  • index

  • variables=None

  • servers=None

get_host_settings

edgeimpulse_api.configuration.get_host_settings(
		self
)

Gets an array of host settings

Parameters

  • self

to_debug_report

edgeimpulse_api.configuration.to_debug_report(
		self
)

Gets the essential information for debugging.

Parameters

  • self

Last updated