conda-devenv icon indicating copy to clipboard operation
conda-devenv copied to clipboard

python-dotenv support

Open paoslaos opened this issue 1 year ago • 1 comments

The readme on the main page is quite nice and helps in using environment variables. Is there a way to use variables that are defined via a python-dotenv file?

# don't use os but a dot env?
{% set conda_py = os.environ.get('CONDA_PY', '35') %}
name: web-ui-py{{ conda_py }}

includes:
  - {{ root }}/../core-business/environment.devenv.yml

The dotenv is just a file that looks like this:


# Development settings
CONDA_PY='35'

paoslaos avatar Nov 11 '23 20:11 paoslaos

Hi @paoslaos,

Not currently. We would be willing to review a PR introducing this feature, with python-dotenv being an optional dependency.

nicoddemus avatar Nov 13 '23 13:11 nicoddemus