:py:mod:`env` ============= .. py:module:: conda_env.env .. autoapi-nested-parse:: Environment object describing the conda environment.yaml file. Classes ------- .. autoapisummary:: conda_env.env.Dependencies conda_env.env.Environment Functions --------- .. autoapisummary:: conda_env.env.validate_keys conda_env.env.load_from_directory conda_env.env.from_environment conda_env.env.from_yaml conda_env.env._expand_channels conda_env.env.from_file Attributes ---------- .. autoapisummary:: conda_env.env.VALID_KEYS .. py:data:: VALID_KEYS :value: ('name', 'dependencies', 'prefix', 'channels', 'variables') .. py:function:: validate_keys(data, kwargs) Check for unknown keys, remove them and print a warning. .. py:function:: load_from_directory(directory) Load and return an ``Environment`` from a given ``directory`` .. py:function:: from_environment(name, prefix, no_builds=False, ignore_channels=False, from_history=False) Get environment object from prefix :param name: The name of environment :param prefix: The path of prefix :param no_builds: Whether has build requirement :param ignore_channels: whether ignore_channels :param from_history: Whether environment file should be based on explicit specs in history Returns: Environment object .. py:function:: from_yaml(yamlstr, **kwargs) Load and return a ``Environment`` from a given ``yaml string`` .. py:function:: _expand_channels(data) Expands environment variables for the channels found in the yaml data .. py:function:: from_file(filename) .. py:class:: Dependencies(raw, *args, **kwargs) Bases: :py:obj:`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) .. py:method:: parse() .. py:method:: add(package_name) .. py:class:: Environment(name=None, filename=None, channels=None, dependencies=None, prefix=None, variables=None) .. py:method:: add_channels(channels) .. py:method:: remove_channels() .. py:method:: to_dict(stream=None) .. py:method:: to_yaml(stream=None) .. py:method:: save()