theskumar / theskumar/python-dotenv
Does not execute default values, subshells, etc.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.9k
- Forks
- 581
- PR merge metrics
- No merged PRs in 30d
Description
if you have a standard .env file:
export USER_EMAIL="${USER_EMAIL:-$(git config --get user.email)}"
export JOB_NAME="${CI_PROJECT_PATH//\//-}"
export UPPER_STAGE=$( echo $CI_ENVIRONMENT_STAGE | awk '{ print toupper(substr($1,1,1)) substr($1,2) }' )
export BUILD_JOB_NAME="Build Job Definition $UPPER_STAGE"
values do not get parsed correctly:
USER_EMAIL=""
JOB_NAME=""
UPPER_STAGE=$( echo $CI_ENVIRONMENT_STAGE | awk '{ print toupper(substr($1,1,1)) substr($1,2) }' )
BUILD_JOB_NAME=Build Job Definition $UPPER_STAGE
See also: https://github.com/theskumar/python-dotenv/issues/326 (1 year ago, no response)
See also: https://github.com/theskumar/python-dotenv/issues/322 (1 year ago, no response)
Happy to open to a PR for this. I think we just need to use python to execute the commands in a shell and set value to the result.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the documented examples in this issue and the referenced issues #326 and #322, then determine which shell constructs python-dotenv should support. The expected result is correctly resolved default values, substitutions, and command substitutions, but the issue does not name source files or tests; resolve scope and execution safety before implementation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, shell
- Domain
- devops, tooling
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100