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=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 #
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_url, name=None)#
- urls(with_credentials=False, subdirs=None)#
- url(with_credentials=False)#
- __str__()#
Return str(self).
- __repr__()#
Return repr(self).
- __eq__(other)#
Return self==value.
- __hash__()#
Return hash(self).
- __nonzero__()#
- __bool__()#
- __json__()#
- dump()#
- class MultiChannel(name, channels, platform=None)#
Bases:
Channel
Channel: 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)#
Return current channels as Channel objects