polywrap_uri_resolvers.resolvers.redirect.redirect_resolver module

This module contains the RedirectResolver class.

class polywrap_uri_resolvers.resolvers.redirect.redirect_resolver.RedirectResolver(from_uri: Uri, to_uri: Uri)[source]

Bases: ResolverWithHistory

Defines a resolver that redirects a uri to another uri.

This resolver redirects a uri to another uri. If the uri to resolve is the same as the uri to redirect from, the uri to redirect to is returned. Otherwise, the uri to resolve is returned.

Parameters:
  • from_uri (Uri) – The uri to redirect from.

  • to_uri (Uri) – The uri to redirect to.

from_uri: Uri
get_step_description() str[source]

Get the description of the resolver step.

Returns:

The description of the resolver step.

Return type:

str

to_uri: Uri