channel
#
Defines Channel and MultiChannel objects and other channel-related functions.
Object inheritance:

Classes#
This metaclass does basic caching and enables static constructor method usage with a |
|
Channel: |
|
Channel: |
Functions#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Return current channels as Channel objects |
- class ChannelType#
Bases:
type
This metaclass does basic caching and enables static constructor method usage with a single arg.
- __call__(*args, **kwargs)#
Call self as a function.
- class Channel(scheme: str | None = None, auth: str | None = None, location: str | None = None, token: str | None = None, name: str | None = None, platform: str | None = None, package_filename: str | None = None)#
Channel: scheme <> auth <> location <> token <> channel <> subchannel <> platform <> package_filename
Package Spec: channel <> subchannel <> namespace <> package_name
- _cache_#
- static from_value(value: str | None) Channel #
Construct a new
Channel
from a single value.- Parameters:
value --
Anyone of the following forms:
- None, or one of the special strings "<unknown>", "None:///<unknown>", or "None":
represents the unknown channel, used for packages with unknown origin.
- A URL including a scheme like
file://
orhttps://
: represents a channel URL.
- A local directory path:
represents a local channel; relative paths must start with
./
.- A package file (i.e. the path to a file ending in
.conda
or.tar.bz2
): represents a channel for a single package
- A known channel name:
represents a known channel, e.g. from the users
.condarc
file or the global configuration.
- Returns:
A channel object.
- static make_simple_channel(channel_alias: Channel, channel_url: str, name: str | None = None) Channel #
- class MultiChannel(name: str, channels: collections.abc.Iterable[Channel], platform: str | None = None)#
Bases:
Channel
Channel: scheme <> auth <> location <> token <> channel <> subchannel <> platform <> package_filename
Package Spec: channel <> subchannel <> namespace <> package_name
- tokenized_startswith(test_iterable: collections.abc.Iterable[Any], startswith_iterable: collections.abc.Iterable[Any]) bool #
- tokenized_conda_url_startswith(test_url: collections.abc.Iterable[str], startswith_url: collections.abc.Iterable[str]) bool #
- _read_channel_configuration(scheme: str | None, host: str | None, port: str | None, path: str | None) tuple[str | None, str | None, str | None, str | None, str | None] #
- prioritize_channels(channels: collections.abc.Iterable[Channel | str], with_credentials: bool = True, subdirs: collections.abc.Iterable[str] | None = None) dict[str, tuple[str, int]] #
- all_channel_urls(channels: collections.abc.Iterable[str | Channel], subdirs: collections.abc.Iterable[str] | None = None, with_credentials: bool = True) boltons.setutils.IndexedSet #
- get_channel_objs(ctx: conda.base.context.Context) tuple[Channel, Ellipsis] #
Return current channels as Channel objects