aiq.registry_handlers.rest.rest_handler#

Attributes#

Classes#

RestRegistryHandler

A registry handler for interactions with a remote REST registry.

Module Contents#

logger#
class RestRegistryHandler(
endpoint: str,
token: str,
timeout: int = 30,
publish_route: str = '',
pull_route: str = '',
search_route: str = '',
remove_route: str = '',
)#

Bases: aiq.registry_handlers.registry_handler_base.AbstractRegistryHandler

A registry handler for interactions with a remote REST registry.

_endpoint#
_timeout = 30#
_publish_route = ''#
_pull_route = ''#
_search_route = ''#
_remove_route = ''#
_headers#
async publish(
artifact: aiq.registry_handlers.schemas.publish.AIQArtifact,
) collections.abc.AsyncGenerator[aiq.registry_handlers.schemas.publish.PublishResponse]#

Publishes an AgentIQ artifact to a remote REST registry.

Args:

artifact (AIQArtifact): An artifact that contain AgentIQ plugin wheel and it’s corrosponding discovery metadata.

Yields:

Iterator[AsyncGenerator[PublishResponse]]: A response message that includes a completion status message.

async pull(
packages: aiq.registry_handlers.schemas.pull.PullRequestPackages,
) collections.abc.AsyncGenerator[aiq.registry_handlers.schemas.pull.PullResponse]#

Download and install AgentIQ artifacts from a remote REST registry.

Args:

packages (PullRequestPackages): Parameters used to pull the AgentIQ artifact.

Yields:
Iterator[AsyncGenerator[PullResponse]]: A response message that includes a the pulled packages and a

completion status message.

async search(
query: aiq.registry_handlers.schemas.search.SearchQuery,
) collections.abc.AsyncGenerator[aiq.registry_handlers.schemas.search.SearchResponse]#

Searches a remote REST registry for relevant AgentIQ components.

Args:

query (SearchQuery): Parameters of the search to be performed.

Yields:
Iterator[AsyncGenerator[SearchResponse]]: A response message that includes search

parameters and a completion status message.

async remove(
packages: aiq.registry_handlers.schemas.package.PackageNameVersionList,
) collections.abc.AsyncGenerator[aiq.registry_handlers.schemas.remove.RemoveResponse]#

Removes packages from a remote REST registry.

Args:

packages (PackageNameVersionList): The list of packages to remove.

Yields:
Iterator[AsyncGenerator[RemoveResponse]]: A response message that includes the packages and a

completion status message.