angee.resources.sources
Registry of resource source types.
A resource entry names its source by a manifest key — path for a local file, url for a remote one. The resources addon owns the source-type seam but registers only the local path source; an addon that owns outbound networking, angee.integrate, registers the url source, so resources itself stays free of any network concern. Each source declares how to normalize its manifest value and how to materialize an entry to a local file.
ResourceSource
@dataclass(frozen=True, slots=True)
class ResourceSource()One resource source type, keyed by its manifest key (path/url).
key
The manifest key that selects this source in a resource declaration.
normalize
Return the stored source value from one raw manifest value.
materialize
Return the local file path for one entry, fetching/resolving as needed.
register_source
def register_source(source: ResourceSource) -> NoneRegister a resource source type, failing fast on a duplicate key.
source_keys
def source_keys() -> frozenset[str]Return every registered source key.
get_source
def get_source(key: str) -> ResourceSourceReturn the registered source for key, or raise with an install hint.