types#
定义特定返回类型,用于定义 Conda 插件钩子。
每种类型对应于其使用的插件钩子。
类#
定义 Conda 子命令插件钩子时要使用的返回类型。 |
|
定义 Conda 虚拟包插件钩子时要使用的返回类型。 |
|
定义 Conda 求解器插件钩子时要使用的返回类型。 |
|
定义 Conda 前置命令插件钩子时要使用的返回类型。 |
|
定义 Conda 后置命令插件钩子时要使用的返回类型。 |
|
类混合,使所有插件实现兼容,例如当它们 |
|
我们要求所有插件实现使用的基类,以实现兼容性。 |
|
定义 Conda 身份验证处理程序钩子时要使用的返回类型。 |
|
定义 Conda 健康检查插件钩子时要使用的返回类型。 |
|
定义 Conda 预求解插件钩子时要使用的返回类型。 |
|
定义 Conda 后求解插件钩子时要使用的返回类型。 |
|
定义 Conda 设置插件钩子时要使用的返回类型。 |
|
提供创建 ABC 标准方法的帮助类,使用 |
|
提供创建 ABC 标准方法的帮助类,使用 |
|
所有报告器渲染器的基类。 |
|
定义 Conda 报告器后端插件钩子时要使用的返回类型。 |
|
定义要包含 HTTP 请求的供应商特定标头 |
- class CondaSubcommand#
定义 Conda 子命令插件钩子时要使用的返回类型。
有关如何使用它的详细信息,请参阅
conda_subcommands()。- 参数:
name -- 子命令名称(例如,
conda my-subcommand-name)。summary -- 子命令摘要,将显示在
conda --help中。action -- 调用子命令时将运行的可调用对象。
configure_parser -- 初始化子命令解析器时将运行的可调用对象。
- configure_parser: Callable[[argparse.ArgumentParser], None] | None#
- class CondaVirtualPackage#
基类:
NamedTuple定义 Conda 虚拟包插件钩子时要使用的返回类型。
有关如何使用它的详细信息,请参阅
conda_virtual_packages()。- 参数:
name -- 虚拟包名称(例如,
my_custom_os)。version -- 虚拟包版本(例如,
1.2.3)。build -- 虚拟包构建字符串(例如,
x86_64)。
- to_virtual_package() conda.models.records.PackageRecord#
- class CondaSolver#
基类:
NamedTuple定义 Conda 求解器插件钩子时要使用的返回类型。
有关如何使用它的详细信息,请参阅
conda_solvers()。- 参数:
name -- 求解器名称(例如,
custom-solver)。backend -- 将被实例化为求解器后端的类型。
- backend: type[conda.core.solve.Solver]#
- class CondaPreCommand#
基类:
NamedTuple定义 Conda 前置命令插件钩子时要使用的返回类型。
有关如何使用它的详细信息,请参阅
conda_pre_commands()。- 参数:
name -- 前置命令名称(例如,
custom_plugin_pre_commands)。action -- 包含要运行代码的可调用对象。
run_for -- 表示将运行此命令的命令(例如,
install或create)。
- class CondaPostCommand#
基类:
NamedTuple定义 Conda 后置命令插件钩子时要使用的返回类型。
有关如何使用它的详细信息,请参阅
conda_post_commands()。- 参数:
name -- 后置命令名称(例如,
custom_plugin_post_commands)。action -- 包含要运行代码的可调用对象。
run_for -- 表示将运行此命令的命令(例如,
install或create)。
- class ChannelNameMixin(channel_name: str, *args, **kwargs)#
类混合,使所有插件实现兼容,例如当它们使用现有的(例如,第三方)请求身份验证处理程序时。
如果您要创建自己的实现,请使用具体的
ChannelAuthBase。
- class ChannelAuthBase(channel_name: str, *args, **kwargs)#
基类:
ChannelNameMixin,requests.auth.AuthBase我们要求所有插件实现使用的基类,以实现兼容性。
身份验证与各个通道紧密耦合。因此,必须在基于
requests.auth.AuthBase的类上设置额外的channel_name属性。
- class CondaAuthHandler#
基类:
NamedTuple定义 Conda 身份验证处理程序钩子时要使用的返回类型。
- 参数:
name -- 名称(例如,
basic-auth)。此名称应该是唯一的,并且一次只能注册一个。handler -- 将在网络请求期间用作身份验证处理程序的类型。
- handler: type[ChannelAuthBase]#
- class CondaHealthCheck#
基类:
NamedTuple定义 Conda 健康检查插件钩子时要使用的返回类型。
- class CondaPreSolve#
定义 Conda 预求解插件钩子时要使用的返回类型。
有关如何使用它的详细信息,请参阅
conda_pre_solves()。- 参数:
name -- 预求解名称(例如,
custom_plugin_pre_solve)。action -- 包含要运行代码的可调用对象。
- action: Callable[[frozenset[conda.models.match_spec.MatchSpec], frozenset[conda.models.match_spec.MatchSpec]], None]#
- class CondaPostSolve#
定义 Conda 后求解插件钩子时要使用的返回类型。
有关如何使用它的详细信息,请参阅
conda_post_solves()。- 参数:
name -- 后求解名称(例如,
custom_plugin_post_solve)。action -- 包含要运行代码的可调用对象。
- action: Callable[[str, tuple[conda.models.records.PackageRecord, Ellipsis], tuple[conda.models.records.PackageRecord, Ellipsis]], None]#
- class CondaSetting#
定义 Conda 设置插件钩子时要使用的返回类型。
有关如何使用它的详细信息,请参阅
conda_settings()。- 参数:
name -- 设置的名称(例如,
config_param)description -- 针对插件用户的设置描述
parameter -- 包含设置定义的 Parameter 实例
aliases -- 设置的别名
- parameter: conda.common.configuration.Parameter#
- class ProgressBarBase(description: str, **kwargs)#
Bases:
abc.ABCHelper class that provides a standard way to create an ABC using inheritance.
- finish()#
- classmethod get_lock()#
- class SpinnerBase(message: str, fail_message: str = 'failed\n')#
Bases:
abc.ABCHelper class that provides a standard way to create an ABC using inheritance.
- abstract __enter__()#
- abstract __exit__(exc_type, exc_val, exc_tb)#
- class ReporterRendererBase#
Bases:
abc.ABC所有报告器渲染器的基类。
- abstract detail_view(data: dict[str, str | int | bool], **kwargs) str#
Render the output in a "tabular" format.
- abstract progress_bar(description: str, **kwargs) ProgressBarBase#
Return a
ProgressBarBase~object to use as a progress bar
- classmethod progress_bar_context_manager() contextlib.AbstractContextManager#
Returns a null context by default but allows plugins to define their own if necessary
- abstract spinner(message, failed_message) SpinnerBase#
Return a
SpinnerBase~object to use as a spinner (i.e. loading dialog)
- class CondaReporterBackend#
定义 Conda 报告器后端插件钩子时要使用的返回类型。
For details on how this is used, see:
conda_reporter_backends().- 参数:
name -- name of the reporter backend (e.g.,
email_reporter) This is how the reporter backend with be references in configuration files.description -- short description of what the reporter handler does
renderer -- implementation of
ReporterRendererBasethat will be used as the reporter renderer
- renderer: type[ReporterRendererBase]#
- class CondaRequestHeader#
定义要包含 HTTP 请求的供应商特定标头
For details on how this is used, see
conda_request_headers()andconda_session_headers().- 参数:
name -- name of the header used in the HTTP request
value -- value of the header used in the HTTP request