types#

Implements all conda.notices types.

Classes#

ChannelNotice

Represents an individual channel notice.

ChannelNoticeResultSet

Represents a list of a channel notices, plus some accompanying

ChannelNoticeResponse

Attributes#

UNDEFINED_MESSAGE_ID = 'undefined'#
class ChannelNotice#

Bases: NamedTuple

Represents an individual channel notice.

id: str#
channel_name: str | None#
message: str | None#
level: conda.base.constants.NoticeLevel#
created_at: datetime.datetime | None#
expired_at: datetime.datetime | None#
interval: int | None#
to_dict()#
class ChannelNoticeResultSet#

Bases: NamedTuple

Represents a list of a channel notices, plus some accompanying metadata such as viewed_channel_notices.

channel_notices: Sequence[ChannelNotice]#
total_number_channel_notices: int#
viewed_channel_notices: int#
class ChannelNoticeResponse#

Bases: NamedTuple

property notices: Sequence[ChannelNotice]#
url: str#
name: str#
json_data: dict | None#
static _parse_notice_level(level: str | None) conda.base.constants.NoticeLevel#

We use this to validate notice levels and provide reasonable defaults if any are invalid.

static _parse_iso_timestamp(iso_timestamp: str | None) datetime.datetime | None#

Parse ISO timestamp and fail over to a default value of none.

classmethod get_cache_key(url: str, cache_dir: pathlib.Path) pathlib.Path#

Returns where this channel response will be cached by hashing the URL.