deployment_api module#

class edgeimpulse_api.api.deployment_api.DeploymentApi(api_client=None)[source]#

Bases: object

download_build(
project_id: StrictInt[StrictInt],
type: StrictStr[StrictStr],
model_type: KerasModelTypeEnum | None[KerasModelTypeEnum | None] = None,
engine: DeploymentTargetEngine | None[DeploymentTargetEngine | None] = None,
**kwargs,
) str[source]#

Download

Download the build artefacts for a project

Parameters:
  • project_id (int) – Project ID (required)

  • type (str) – The name of the built target. You can find this by listing all deployment targets through listDeploymentTargetsForProject (via GET /v1/api/{projectId}/deployment/targets) and see the format type. (required)

  • model_type (KerasModelTypeEnum) – Optional model type of the build (if not, it uses the settings in the Keras block)

  • engine (DeploymentTargetEngine) – Optional engine for the build (if not, it uses the default engine for the deployment target)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

str

find_syntiant_posterior(
project_id: StrictInt[StrictInt],
target_words: List[StrictStr],
reference_set: StrictStr,
wav_file: StrictStr | None = None,
meta_csv_file: StrictStr | None = None,
deployment_target: StrictStr | None = None,
**kwargs,
) StartJobResponse[source]#

Find Syntiant posterior parameters

Automatically find the current posterior parameters for the Syntiant deployment target

Parameters:
  • project_id (int) – Project ID (required)

  • target_words (List[str]) – (required)

  • reference_set (str) – (required)

  • wav_file (str) –

  • meta_csv_file (str) –

  • deployment_target (str) –

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

StartJobResponse

get_deployment(
project_id: StrictInt[StrictInt],
type: StrictStr[StrictStr],
model_type: KerasModelTypeEnum | None[KerasModelTypeEnum | None] = None,
engine: DeploymentTargetEngine | None[DeploymentTargetEngine | None] = None,
**kwargs,
) GetDeploymentResponse[source]#

Get deployment info

Gives information on whether a deployment was already built for a type

Parameters:
  • project_id (int) – Project ID (required)

  • type (str) – The name of the built target. You can find this by listing all deployment targets through listDeploymentTargetsForProject (via GET /v1/api/{projectId}/deployment/targets) and see the format type. (required)

  • model_type (KerasModelTypeEnum) – Optional model type of the build (if not, it uses the settings in the Keras block)

  • engine (DeploymentTargetEngine) – Optional engine for the build (if not, it uses the default engine for the deployment target)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

GetDeploymentResponse

get_evaluate_job_result(
project_id: StrictInt[StrictInt],
**kwargs,
) EvaluateJobResponse[source]#

Evaluate job result

Get evaluate job result, containing detailed performance statistics for every possible variant of the impulse.

Parameters:
  • project_id (int) – Project ID (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

EvaluateJobResponse

get_evaluate_job_result_cache(
project_id: StrictInt[StrictInt],
**kwargs,
) EvaluateJobResponse[source]#

Check evaluate job result (cache)

Get evaluate job result, containing detailed performance statistics for every possible variant of the impulse. This only checks cache, and throws an error if there is no data in cache.

Parameters:
  • project_id (int) – Project ID (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

EvaluateJobResponse

get_last_deployment_build(
project_id: StrictInt[StrictInt],
**kwargs,
) GetLastDeploymentBuildResponse[source]#

Get information on the last deployment build

Get information on the result of the last successful deployment job, including info on the build e.g. whether it is still valid.

Parameters:
  • project_id (int) – Project ID (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

GetLastDeploymentBuildResponse

get_syntiant_posterior(
project_id: StrictInt[StrictInt],
**kwargs,
) GetSyntiantPosteriorResponse[source]#

Get Syntiant posterior parameters

Get the current posterior parameters for the Syntiant deployment target

Parameters:
  • project_id (int) – Project ID (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

GetSyntiantPosteriorResponse

list_all_deployment_targets(
**kwargs,
) DeploymentTargetsResponse[source]#

Deployment targets

List all deployment targets

Parameters:
  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

DeploymentTargetsResponse

list_deployment_targets_for_project(
project_id: StrictInt[StrictInt],
**kwargs,
) ProjectDeploymentTargetsResponse[source]#

Deployment targets

List deployment targets for a project

Parameters:
  • project_id (int) – Project ID (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

ProjectDeploymentTargetsResponse

list_deployment_targets_for_project_data_sources(
project_id: StrictInt[StrictInt],
**kwargs,
) DeploymentTargetsResponse[source]#

Deployment targets (data sources)

List deployment targets for a project from data sources page (it shows some things like all Linux deploys, and hides ‘fake’ deploy targets like mobile phone / computer)

Parameters:
  • project_id (int) – Project ID (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

DeploymentTargetsResponse

set_syntiant_posterior(
project_id: StrictInt[StrictInt],
set_syntiant_posterior_request: SetSyntiantPosteriorRequest,
**kwargs,
) GenericApiResponse[source]#

Set Syntiant posterior parameters

Set the current posterior parameters for the Syntiant deployment target

Parameters:
  • project_id (int) – Project ID (required)

  • set_syntiant_posterior_request (SetSyntiantPosteriorRequest) – (required)

  • async_req (bool, optional) – Whether to execute the request asynchronously.

  • _preload_content (bool, optional) – if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True.

  • _request_timeout – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

Returns:

Returns the result object. If the method is called asynchronously, returns the request thread.

Return type:

GenericApiResponse