pylabrobot.resources.Trough.find_resource#
- Trough.find_resource(fn: Callable[[Resource], bool] | None = None, *, metadata: Mapping[str, Any] | None = None, has_metadata: str | Iterable[str] | None = None, recursive: bool = True, name: Pattern | Callable[[Any], bool] | str | None = None, type: type | Tuple[type, ...] | Pattern | Callable[[Any], bool] | str | None = None, model: Pattern | Callable[[Any], bool] | str | None = None, category: Pattern | Callable[[Any], bool] | str | None = None) Resource | None#
Find the first matching resource, or None if not found.
Accepts the same arguments as
find_resources()and returns its first result (selfis checked first, so it may be returned), orNoneif nothing matches.