requirement
Build one requirement descriptor from its key alone.
Generated from Plexora 0.0.55View source
from plexora.api import requirementAlso available as plexora.api.plugin.requirement.
requirement(key: str, optional: bool = False) -> RequirementUsed to ask for an input no plugin declared up front -- the Cells
control's "Add Data" button, or code that names a key directly rather
than going through Requires. The wording of the resulting question is
always core's; this only says which input is being asked for.
Parameters
keystrrequiredWhich input to ask for: "table", "segmentation",
"markers", "features", "coordinates", or "role:<name>"
for a column role.
optionalbooldefault FalseWhether the tool can open without this input. Defaults to False.
Returns
RequirementThe descriptor, ready to show in the requirements modal.
Raises
KeyErrorIf key does not name a recognized input.