:py:mod:`plugins` ================= .. py:module:: conda.plugins.subcommands.plugins .. autoapi-nested-parse:: Implementation for `conda plugins` subcommand. .. toctree:: :hidden: :titlesonly: :maxdepth: 3 info/index.rst list/index.rst Classes ------- .. autoapisummary:: conda.plugins.subcommands.plugins.CondaSubcommand Functions --------- .. autoapisummary:: conda.plugins.subcommands.plugins.configure_parser conda.plugins.subcommands.plugins.execute conda.plugins.subcommands.plugins.conda_subcommands Attributes ---------- .. autoapisummary:: conda.plugins.subcommands.plugins.hookimpl conda.plugins.subcommands.plugins.SUMMARY .. py:data:: hookimpl Decorator to mark plugin hook implementations, used to register plugins. .. py:class:: CondaSubcommand(*, name: str, summary: str, action: collections.abc.Callable[[argparse.Namespace], int | None], configure_parser: collections.abc.Callable[[argparse.ArgumentParser], None], aliases: str | collections.abc.Iterable[str] = ()) CondaSubcommand(*, name: str, summary: str, action: collections.abc.Callable[[tuple[str, ...]], int | None], configure_parser: None = None, aliases: str | collections.abc.Iterable[str] = ()) Bases: :py:obj:`CondaPlugin` Return type to use when defining a conda subcommand plugin hook. For details on how this is used, see :meth:`~conda.plugins.hookspec.CondaSpecs.conda_subcommands`. Subcommands support two shapes, distinguished by ``configure_parser``: * If ``configure_parser`` is set, ``action`` receives the parsed :class:`argparse.Namespace`. * If ``configure_parser`` is omitted, ``action`` receives the remaining argv as :class:`tuple[str, ...]`. :param name: Subcommand name (e.g., ``conda my-subcommand-name``). :param summary: Subcommand summary, will be shown in ``conda --help``. :param action: Callable that will be run when the subcommand is invoked. :param aliases: Alternative name or names for the subcommand. :param configure_parser: Callable that will be run when the subcommand parser is initialized. .. py:attribute:: summary :type: str .. py:attribute:: action :type: collections.abc.Callable[[argparse.Namespace], int | None] | collections.abc.Callable[[tuple[str, ...]], int | None] .. py:attribute:: aliases :type: tuple[str, ...] :value: () .. py:attribute:: configure_parser :type: collections.abc.Callable[[argparse.ArgumentParser], None] | None :value: None .. py:data:: SUMMARY :value: 'Manage conda plugins.' .. py:function:: configure_parser(parser: argparse.ArgumentParser) -> None .. py:function:: execute(args: argparse.Namespace) -> int .. py:function:: conda_subcommands()