:py:mod:`requirements` ====================== .. py:module:: conda.env.specs.requirements .. autoapi-nested-parse:: Define requirements.txt spec. Classes ------- .. autoapisummary:: conda.env.specs.requirements.RequirementsSpec .. py:class:: RequirementsSpec(filename=None, **kwargs) Bases: :py:obj:`conda.plugins.types.EnvironmentSpecBase` Reads dependencies from a requirements.txt file and returns an Environment object from it. .. py:property:: name .. py:property:: environment Express the provided environment file as a conda environment object. :returns Environment: the conda environment represented by the file. .. py:attribute:: msg .. py:attribute:: extensions .. py:method:: _valid_file() .. py:method:: _valid_name() .. py:method:: can_handle() -> bool Validates loader can process environment definition. This can handle if: * the provided file ends in the supported file extensions (.txt) * the file exists :return: True if the file can be parsed and handled, False otherwise