python-configuration icon indicating copy to clipboard operation
python-configuration copied to clipboard

Interpolate bash-style variable expansion in .env files

Open publicmatt opened this issue 1 year ago • 1 comments

It would be nice if the behavior when loading dotenv files matched what's possible with the python-dotenv package:

The syntax of .env files supported by python-dotenv is similar to that of Bash:

# Development settings
DOMAIN=example.org
ADMIN_EMAIL=admin@${DOMAIN}
ROOT_URL=${DOMAIN}/app

publicmatt avatar Apr 10 '24 21:04 publicmatt

Maybe this could be added if we specify a different interpolation type. Right now we use the str.format specifications: https://github.com/tr11/python-configuration?tab=readme-ov-file#string-interpolation

tr11 avatar Apr 11 '24 00:04 tr11