ComponentCatalog#

class scikitplot.corpus.ComponentCatalog(specs=(), *, outcomes=())[source]#

An immutable snapshot of every registered component.

Parameters:
specsiterable of ComponentSpec

The collected specs.

Parameters:
  • specs (Any)

  • outcomes (Any)

Notes

A snapshot, not a live proxy: building it walks the registries once. Call component_catalog again after registering something new.

available(category=None)[source]#

Return only components that are usable now.

Parameters:

category (str | None)

Return type:

list[ComponentSpec]

categories()[source]#

Return the sorted category names present.

Return type:

list[str]

discovery_failures()[source]#

Sources that could not be consulted.

Returns:
list of DiscoveryOutcome

Empty when every source answered. A non-empty result means the catalog is incomplete for a reason worth acting on, which an empty category alone could never tell you.

Return type:

list[DiscoveryOutcome]

get(category, name)[source]#

Return one spec, or None if it is not registered.

Parameters:
Return type:

ComponentSpec | None

list(category=None)[source]#

Return specs, optionally filtered to one category.

Parameters:

category (str | None)

Return type:

list[ComponentSpec]

property outcomes: tuple[DiscoveryOutcome, ...]#

What happened when each source was consulted.

to_dict()[source]#

Return a JSON-compatible mapping grouped by category.

Return type:

dict[str, Any]