polywrap_uri_resolvers.resolvers.static.static_resolver module

This module contains the StaticResolver class.

class polywrap_uri_resolvers.resolvers.static.static_resolver.StaticResolver(uri_map: Dict[Uri, Uri | UriWrapper | UriPackage])[source]

Bases: UriResolver

Defines the static URI resolver.

Parameters:

uri_map (StaticResolverLike) – The URI map to use.

try_resolve_uri(uri: Uri, client: InvokerClient, resolution_context: UriResolutionContext) Uri | UriWrapper | UriPackage[source]

Try to resolve a URI to a wrap package, a wrapper, or a URI.

Parameters:
Returns:

The resolved URI.

Return type:

UriPackageOrWrapper

uri_map: Dict[Uri, Uri | UriWrapper | UriPackage]