channel#
定义 Channel 和 MultiChannel 对象以及其他频道相关函数。
对象继承

类#
此元类执行基本缓存,并支持使用单个参数的静态构造函数方法。 |
|
Channel |
|
Channel |
函数#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
返回当前频道作为 Channel 对象 |
- class Channel(scheme=None, auth=None, location=None, token=None, name=None, platform=None, package_filename=None)#
Channel: scheme <> auth <> location <> token <> channel <> subchannel <> platform <> package_filename
Package Spec: channel <> subchannel <> namespace <> package_name
- property channel_location#
- property channel_name#
- property subdir#
- property canonical_name#
- property base_url#
- property base_urls#
- property subdir_url#
- property url_channel_wtf#
- _cache_#
- static _reset_state()#
- static from_url(url)#
- static from_channel_name(channel_name)#
- static from_value(value: str | None) Self#
从单个值构造新的
Channel。- 参数:
value --
以下任何形式
- None,或特殊字符串 "<unknown>"、"None:///<unknown>" 或 "None" 之一
表示未知频道,用于来源未知的包。
- 包括方案的 URL,例如
file://或https:// 表示频道 URL。
- 本地目录路径
表示本地频道;相对路径必须以
./开头。- 包文件(即以
.conda或.tar.bz2结尾的文件路径) 表示单个包的频道
- 已知的频道名称
表示已知的频道,例如来自用户的
.condarc文件或全局配置。
- 返回:
频道对象。
- static make_simple_channel(channel_alias, channel_url, name=None)#
- urls(with_credentials=False, subdirs=None)#
- url(with_credentials=False)#
- __str__()#
返回 str(self)。
- __repr__()#
返回 repr(self)。
- __eq__(other)#
返回 self==value。
- __hash__()#
返回 hash(self)。
- __nonzero__()#
- __bool__()#
- __json__()#
- dump()#
- class MultiChannel(name, channels, platform=None)#
基类:
ChannelChannel: scheme <> auth <> location <> token <> channel <> subchannel <> platform <> package_filename
Package Spec: channel <> subchannel <> namespace <> package_name
- property channel_location#
- property canonical_name#
- property base_url#
- property base_urls#
- urls(with_credentials=False, subdirs=None)#
- url(with_credentials=False)#
- dump()#
- tokenized_startswith(test_iterable, startswith_iterable)#
- tokenized_conda_url_startswith(test_url, startswith_url)#
- _get_channel_for_name(channel_name)#
- _read_channel_configuration(scheme, host, port, path)#
- parse_conda_channel_url(url)#
- get_conda_build_local_url()#
- prioritize_channels(channels, with_credentials=True, subdirs=None)#
- all_channel_urls(channels, subdirs=None, with_credentials=True)#
- offline_keep(url)#
- get_channel_objs(ctx: conda.base.context.Context)#
返回当前频道作为 Channel 对象