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:
UriResolverDefines 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:
uri (Uri) – The URI to resolve.
client (InvokerClient) – The client to use for resolving the URI.
resolution_context (UriResolutionContext) – The resolution context.
- Returns:
The resolved URI.
- Return type:
UriPackageOrWrapper
- uri_map: Dict[Uri, Uri | UriWrapper | UriPackage]