environment#

EXPERIMENTAL Conda environment data model

Classes#

EnvironmentConfig

Experimental While experimental, expect both major and minor changes across minor releases.

Environment

Experimental While experimental, expect both major and minor changes across minor releases.

class EnvironmentConfig#

Experimental While experimental, expect both major and minor changes across minor releases.

Data model for a conda environment config.

aggressive_update_packages: bool | None#
channel_priority: conda.base.constants.ChannelPriority | None#
channels: list[str]#
channel_settings: dict[str, str]#
deps_modifier: conda.base.constants.DepsModifier | None#
disallowed_packages: list[str]#
pinned_packages: list[str]#
repodata_fns: list[str]#
sat_solver: conda.base.constants.SatSolverChoice | None#
solver: str | None#
track_features: list[str]#
update_modifier: conda.base.constants.UpdateModifier | None#
use_only_tar_bz2: bool | None#
_append_without_duplicates(first: list, second: list) list#
_merge(other: EnvironmentConfig) EnvironmentConfig#

Experimental While experimental, expect both major and minor changes across minor releases.

Merges an EnvironmentConfig into this one. Merging rules are: * Primitive types get clobbered if subsequent configs have a value, otherwise keep the last set value * Lists get appended to and deduplicated * Dicts get updated

classmethod merge(*configs: EnvironmentConfig) EnvironmentConfig#

Experimental While experimental, expect both major and minor changes across minor releases.

Merges a list of EnvironmentConfigs into a single one. Merging rules are: * Primitive types get clobbered if subsequent configs have a value, otherwise keep the last set value * Lists get appended to and deduplicated * Dicts get updated

class Environment#

Experimental While experimental, expect both major and minor changes across minor releases.

Data model for a conda environment.

prefix: str#
platform: str#
config: EnvironmentConfig | None#
external_packages: dict[str, list[str]]#
explicit_packages: list[conda.models.records.PackageRecord]#
name: str | None#
requested_packages: list[conda.models.match_spec.MatchSpec]#
variables: dict[str, str]#
__post_init__()#
classmethod merge(*environments)#

Experimental While experimental, expect both major and minor changes across minor releases.

Merges multiple environments into a single environment following the rules: * Keeps first name and/or prefix. * Concatenates and deduplicates requirements. * Reduces configuration and variables (last key wins).