yaml_file#

Define YAML spec.

Classes#

YamlFileSpec

EXPERIMENTAL

class YamlFileSpec(filename=None, **kwargs)#

Bases: conda.plugins.types.EnvironmentSpecBase

EXPERIMENTAL

Base class for all environment specifications.

Environment specs parse different types of environment definition files (environment.yml, requirements.txt, pyproject.toml, etc.) into a common Environment object model.

property environment: conda.env.env.EnvironmentYaml#
property env: conda.models.environment.Environment#

Express the provided environment file as a conda environment object.

Returns Environment:

the conda environment represented by the file.

detection_supported = False#
_environment#
extensions#
can_handle()#

Validates loader can process environment definition. This can handle if:

  • the provided file exists

  • the provided file ends in the supported file extensions (.yaml or .yml)

  • the yaml file can be loaded and is not empty

Returns:

True or False