nat.registry_handlers.local.local_handler#

Attributes#

Classes#

LocalRegistryHandler

A registry handler for interactions with a local Python environment.

Module Contents#

logger#
class LocalRegistryHandler#

Bases: nat.registry_handlers.registry_handler_base.AbstractRegistryHandler

A registry handler for interactions with a local Python environment.

search_fields: list[nat.registry_handlers.schemas.search.SearchFields]#
async publish(
artifact: nat.registry_handlers.schemas.publish.Artifact,
) collections.abc.AsyncGenerator[nat.registry_handlers.schemas.publish.PublishResponse]#

Publishes a NAT artifact to a local registry.

Args:

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

Yields:

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

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

Download and install NAT artifacts from a local registry.

Args:

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

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

completion status message.

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

Searches the local nat registry for relevant NAT 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: nat.registry_handlers.schemas.package.PackageNameVersionList,
) collections.abc.AsyncGenerator[nat.registry_handlers.schemas.remove.RemoveResponse]#

Uninstall packages from the local Python environment.

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.