mate_rest_client.manticore module

Python API bindings for Manticore endpoints in the MATE REST API.

class mate_rest_client.manticore.ManticoreRoutes(client: mate_rest_client.Client)

Bases: mate_rest_client.common.Routes

An adapter for interactions with Manticore endpoints.

Parameters

client (mate_rest_client.Client) –

Return type

None

get(id_: str) mate_rest_client.manticore.ManticoreTask

Retrieves a particular Manticore task by its unique identifier.

Parameters

id_ (str) –

Return type

mate_rest_client.manticore.ManticoreTask

iter(**kwargs: Dict[str, Any]) Iterator[mate_rest_client.manticore.ManticoreTask]

Yields each ManticoreTask currently available.

Parameters

kwargs (Dict[str, Any]) –

Return type

Iterator[mate_rest_client.manticore.ManticoreTask]

maybe_get(id_: str) Optional[mate_rest_client.manticore.ManticoreTask]

Return an Manticore task by ID, or None if the Manticore task does not exist.

Parameters

id_ (str) –

Return type

Optional[mate_rest_client.manticore.ManticoreTask]

stop(id_: str) mate_rest_client.manticore.ManticoreTask

Instructs the server to stop the given Manticore task ID.

Parameters

id_ (str) –

Return type

mate_rest_client.manticore.ManticoreTask

class mate_rest_client.manticore.ManticoreTask(client: mate_rest_client.Client, info: MantiserveTaskInformation)

Bases: mate_rest_client.common.APIModel

Represents a Manticore (“Mantiserve”) task retrieved from MATE.

property artifacts: Iterator[artifacts.Artifact]

Yields each artifact associated with this Manticore task.

property build: builds.Build

Returns the build associated with this Manticore task.

property id_: str

Returns a unique ID for this Manticore task.

refresh() None

Refresh the internal state of this Manticore task.

Return type

None

property state: mate_common.models.manticore.MantiserveTaskState

Returns the state that this Manticore task is in.

stop() None

Attempt to stop this task, refreshing the state in the process.

Return type

None