Shortcuts

ExternalRegistry

class flash.core.registry.ExternalRegistry(getter, name, providers=None, verbose=False, **metadata)[source]

The ExternalRegistry is a FlashRegistry that can point to an external provider via a getter function.

Parameters
  • getter (Callable) – A function whose first argument is a key that can optionally take additional args and kwargs.

  • providers (Union[Provider, List[Provider], None]) – The provider(/s) of entries in this registry.

available_keys()[source]

Since we don’t know the available keys, just give a generic message.

Return type

List[str]

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

Returns a partial of the getter with the first argument as the given key and wrapped to print the providers.

Return type

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