capability_snapshot#

scikitplot.corpus.capability_snapshot(extra_distributions=(), *, load=False)[source]#

Return a read-only snapshot of the runtime corpus capabilities.

Parameters:
extra_distributionsiterable of str, optional

Additional distribution names to record beyond the built-in set.

loadbool, optional

False (default) imports no backend: one whose probe would load it (Annoy, which loads scikit-learn and SciPy) reports "unknown" / "not_loaded" unless this process already loaded it. True loads it to tell "available" from "broken" (F-50).

Returns:
dict

A mapping with keys:

pythonstr

Python version (e.g. "3.11.6").

implementationstr

Interpreter implementation (e.g. "CPython").

platformstr

Platform identifier from platform.platform.

ann_backendsdict

{name: {"status", "reason_code", "available", "version", "aliases"}} for every registered ANN backend; status is a CapabilityStatus value and available is derived from it.

distributionsdict

{distribution: version | None} for the relevant optional packages (plus any extra_distributions).

Parameters:
Return type:

dict[str, Any]

Notes

Purely observational — it acquires no locks, mutates no state, and never raises for a missing optional component (absent components report None / False), so it is safe to embed in a run/build manifest.