Shortcuts

FlashRegistry

class flash.core.registry.FlashRegistry(name, verbose=False)[source]

This class is used to register function or functools.partial class to a registry.

get(key, with_metadata=False, strict=True, **metadata)[source]

This function is used to gather matches from the registry:

Parameters
  • key (str) – Name of the registered function.

  • with_metadata (bool) – Whether to include the associated metadata in the return value.

  • strict (bool) – Whether to return all matches or just one.

  • metadata – Metadata used to filter against existing registry item’s metadata.

Return type

Union[Callable, Dict[str, Any], List[Dict[str, Any]], List[Callable]]