env

Environment object describing the conda environment.yaml file.

Classes

Dependencies

dict() -> new empty dictionary

Environment

Functions

validate_keys(data, kwargs)

Check for unknown keys, remove them and print a warning.

load_from_directory(directory)

Load and return an Environment from a given directory

from_environment(name, prefix[, no_builds, ...])

Get environment object from prefix

from_yaml(yamlstr, **kwargs)

Load and return a Environment from a given yaml string

_expand_channels(data)

Expands environment variables for the channels found in the yaml data

from_file(filename)

Attributes

VALID_KEYS

VALID_KEYS = ('name', 'dependencies', 'prefix', 'channels', 'variables')
validate_keys(data, kwargs)

Check for unknown keys, remove them and print a warning.

load_from_directory(directory)

Load and return an Environment from a given directory

from_environment(name, prefix, no_builds=False, ignore_channels=False, from_history=False)

Get environment object from prefix

Parameters
  • name -- The name of environment

  • prefix -- The path of prefix

  • no_builds -- Whether has build requirement

  • ignore_channels -- whether ignore_channels

  • from_history -- Whether environment file should be based on explicit specs in history

Returns: Environment object

from_yaml(yamlstr, **kwargs)

Load and return a Environment from a given yaml string

_expand_channels(data)

Expands environment variables for the channels found in the yaml data

from_file(filename)
class Dependencies(raw, *args, **kwargs)

Bases: dict

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's

(key, value) pairs

dict(iterable) -> new dictionary initialized as if via:

d = {} for k, v in iterable:

d[k] = v

dict(**kwargs) -> new dictionary initialized with the name=value pairs

in the keyword argument list. For example: dict(one=1, two=2)

parse()
add(package_name)
class Environment(name=None, filename=None, channels=None, dependencies=None, prefix=None, variables=None)
add_channels(channels)
remove_channels()
to_dict(stream=None)
to_yaml(stream=None)
save()