nxp_monkey.kex_client

design / api / kex_client

KexClient

Kind: class.

HTTP client for NXP's public KEX storage API. This is the only place in the package that knows upstream URL shapes; everything else goes through it. See ADR-0007.

Why a class

The client carries cache state (version list, portfolio map) and resolves versions lazily across many calls in one logical session. Using a class avoids re-fetching the version list on every operation and lets tests inject pre-populated caches.

Working definition

A KexClient with no version argument behaves as "give me the latest reasonable answer for any part you ask about." With an explicit version, it behaves as "answer everything against this exact tool version."

Key methods

NxpFetchError

Kind: exception.

Raised whenever the KEX upstream cannot be fetched, parsed, or extracted safely. The package never silently swallows upstream failures: anything that prevents data acquisition surfaces as this exception.

list_versions

Kind: function.

Stateless convenience wrapper for callers that do not want to manage a KexClient instance. Equivalent to KexClient().list_versions(refresh=refresh).

latest_version

Kind: function.

Stateless convenience wrapper. Returns the highest published tool version name.

list_families

Kind: function.

Stateless convenience wrapper. Returns the processor families published for one tool version (or the latest by default).

portfolio_latest_map

Kind: function.

Stateless convenience wrapper. Returns the merged family-to-version map used by ADR-0007 to handle frozen families.