nxp_monkey.fetch

design / api / fetch

fetch

Kind: function.

Fetch one part's data tree into the local cache, returning the path to the unpacked processors/<part>/<variant>/ directory.

Rationale

This is the primary library entry point. It is idempotent: if the target directory already exists and is non-empty, fetch returns immediately without hitting the network. Pass force=True to refetch.

Working definition

"Give me part's SDK data on disk." The function selects the right upstream tool version automatically (portfolio-latest) so callers rarely need to specify version.

Tests

fetch_all

Kind: function.

Fetch every part in the portfolio, optionally restricted to a family prefix. Continues past per-part errors and returns the list of successfully fetched paths.

Rationale

Bulk acquisition for index builds and offline analysis. Errors on a single family must not abort the run because the API occasionally returns 500-class responses for individual families.