mate_rest_client.builds module

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

class mate_rest_client.builds.Build(client: mate_rest_client.Client, info: mate_common.models.builds.BuildInformation)

Bases: mate_rest_client.common.APIModel

Represents a build retrieved from MATE.

property artifacts: Iterator[mate_rest_client.artifacts.Artifact]

Yields each artifact associated with this build.

property bitcode_artifact: mate_rest_client.artifacts.Artifact

Returns the bitcode artifact that this build was started with.

property compilation: compilations.Compilation

Returns the compilation that this build was produced from.

property id_: str

Returns a unique identifier for this build.

property pois: Iterator[mate_rest_client.pois.POI]

Yields each POI associated with this build.

refresh() None

Refresh the internal state of this build.

Return type

None

property state: mate_common.models.builds.BuildState

Returns the state that this build is in.

property tasks: Iterator[mate_common.models.analyses.AnalysisTaskInfo]

Yields each analysis task associated with this build.

class mate_rest_client.builds.BuildRoutes(client: mate_rest_client.Client)

Bases: mate_rest_client.common.Routes

An adapter for interactions with build endpoints.

Parameters

client (mate_rest_client.Client) –

Return type

None

create_from_compilation(compilation: compilations.Compilation, options: BuildOptions, *, target: Optional[str] = None, run_all_pois: bool = False) List[Build]

Create one or more builds from a compilation.

If target is passed and matches a binary produced by the compilation, creates a build only for that binary.

All created builds are returned in a list.

Parameters
Return type

List[Build]

get(id_: str) mate_rest_client.builds.Build

Retrieves a particular Build by its unique identifier.

Parameters

id_ (str) –

Return type

mate_rest_client.builds.Build

iter(**kwargs: Dict[str, Any]) Iterator[mate_rest_client.builds.Build]

Yield each Build currently available.

Any additional filters can be supplied via keyword arguments.

Parameters

kwargs (Dict[str, Any]) –

Return type

Iterator[mate_rest_client.builds.Build]

maybe_get(id_: str) Optional[mate_rest_client.builds.Build]

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

Parameters

id_ (str) –

Return type

Optional[mate_rest_client.builds.Build]