plugins
#
In this module, you will find everything relevant to conda's plugin system. It contains all of the code that plugin authors will use to write plugins, as well as conda's internal implementations of plugins.
Modules relevant for plugin authors
conda.plugins.hookspec
: all available hook specifications are listed here, including examples of how to use themconda.plugins.types
: important types to use when defining plugin hooks
Modules relevant for internal development
conda.plugins.manager
: includes our custom subclass of pluggy's PluginManager class
Modules with internal plugin implementations
conda.plugins.solvers
: implementation of the "classic" solverconda.plugins.subcommands.doctor
:conda doctor
subcommandconda.plugins.virtual_packages
: registers virtual packages in conda
Classes#
Return type to use when the defining the conda auth handlers hook. |
|
Return type to use when defining conda health checks plugin hook. |
|
Return type to use when defining a conda post-command plugin hook. |
|
Return type to use when defining a conda post-solve plugin hook. |
|
Return type to use when defining a conda pre-command plugin hook. |
|
Return type to use when defining a conda pre-solve plugin hook. |
|
Return type to use when defining a conda setting plugin hook. |
|
Return type to use when defining a conda solver plugin hook. |
|
Return type to use when defining a conda subcommand plugin hook. |
|
Return type to use when defining a conda virtual package plugin hook. |
Attributes#
Decorator used to mark plugin hook implementations |
- hookimpl#
Decorator used to mark plugin hook implementations
- class CondaAuthHandler#
Bases:
NamedTuple
Return type to use when the defining the conda auth handlers hook.
- Parameters:
name -- Name (e.g.,
basic-auth
). This name should be unique and only one may be registered at a time.handler -- Type that will be used as the authentication handler during network requests.
- handler: type[ChannelAuthBase]#
- class CondaHealthCheck#
Bases:
NamedTuple
Return type to use when defining conda health checks plugin hook.
- class CondaPostCommand#
Bases:
NamedTuple
Return type to use when defining a conda post-command plugin hook.
For details on how this is used, see
conda_post_commands()
.- Parameters:
name -- Post-command name (e.g.,
custom_plugin_post_commands
).action -- Callable which contains the code to be run.
run_for -- Represents the command(s) this will be run on (e.g.
install
orcreate
).
- class CondaPostSolve#
Return type to use when defining a conda post-solve plugin hook.
For details on how this is used, see
conda_post_solves()
.- Parameters:
name -- Post-solve name (e.g.,
custom_plugin_post_solve
).action -- Callable which contains the code to be run.
- action: Callable[[str, tuple[conda.models.records.PackageRecord, Ellipsis], tuple[conda.models.records.PackageRecord, Ellipsis]], None]#
- class CondaPreCommand#
Bases:
NamedTuple
Return type to use when defining a conda pre-command plugin hook.
For details on how this is used, see
conda_pre_commands()
.- Parameters:
name -- Pre-command name (e.g.,
custom_plugin_pre_commands
).action -- Callable which contains the code to be run.
run_for -- Represents the command(s) this will be run on (e.g.
install
orcreate
).
- class CondaPreSolve#
Return type to use when defining a conda pre-solve plugin hook.
For details on how this is used, see
conda_pre_solves()
.- Parameters:
name -- Pre-solve name (e.g.,
custom_plugin_pre_solve
).action -- Callable which contains the code to be run.
- action: Callable[[frozenset[conda.models.match_spec.MatchSpec], frozenset[conda.models.match_spec.MatchSpec]], None]#
- class CondaSetting#
Return type to use when defining a conda setting plugin hook.
For details on how this is used, see
conda_settings()
.- Parameters:
name -- name of the setting (e.g.,
config_param
)description -- description of the setting that should be targeted towards users of the plugin
parameter -- Parameter instance containing the setting definition
aliases -- alternative names of the setting
- parameter: conda.common.configuration.Parameter#
- class CondaSolver#
Bases:
NamedTuple
Return type to use when defining a conda solver plugin hook.
For details on how this is used, see
conda_solvers()
.- Parameters:
name -- Solver name (e.g.,
custom-solver
).backend -- Type that will be instantiated as the solver backend.
- backend: type[conda.core.solve.Solver]#
- class CondaSubcommand#
Return type to use when defining a conda subcommand plugin hook.
For details on how this is used, see
conda_subcommands()
.- Parameters:
name -- Subcommand name (e.g.,
conda my-subcommand-name
).summary -- Subcommand summary, will be shown in
conda --help
.action -- Callable that will be run when the subcommand is invoked.
configure_parser -- Callable that will be run when the subcommand parser is initialized.
- configure_parser: Callable[[argparse.ArgumentParser], None] | None#
- class CondaVirtualPackage#
Bases:
NamedTuple
Return type to use when defining a conda virtual package plugin hook.
For details on how this is used, see
conda_virtual_packages()
.- Parameters:
name -- Virtual package name (e.g.,
my_custom_os
).version -- Virtual package version (e.g.,
1.2.3
).build -- Virtual package build string (e.g.,
x86_64
).
- to_virtual_package() conda.models.records.PackageRecord #