Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make interpolation optional #145

Closed
wants to merge 3 commits into from
Closed

Conversation

nwjlyons
Copy link

@nwjlyons nwjlyons commented Sep 22, 2017

Values that begin with a $ will be interpolated. Pass interpolate=False to environ.Env to disable this feature.

PROXIED_VAR=$STR_VAR
STR_VAR=bar
env = environ.Env()
env.str('PROXIED_VAR')
>>> 'bar'

env = environ.Env(interpolate=False)
env.str('PROXIED_VAR')
>>> '$STR_VAR'

Example use case is a password stored in a environment variable which begins with $.

nwjlyons and others added 3 commits September 22, 2017 11:35
Pass interpolate=False to __init__

eg.
    environ.Env(interpolate=False)
@coveralls
Copy link

coveralls commented Sep 22, 2017

Coverage Status

Coverage increased (+0.03%) to 88.462% when pulling 423a076 on secretescapes:develop into 628ed38 on joke2k:develop.

1 similar comment
@coveralls
Copy link

coveralls commented Sep 22, 2017

Coverage Status

Coverage increased (+0.03%) to 88.462% when pulling 423a076 on secretescapes:develop into 628ed38 on joke2k:develop.

@joke2k joke2k added duplicate This issue or pull request already exists Edit and removed duplicate This issue or pull request already exists Edit labels Jun 5, 2018
@joke2k joke2k added this to the Road to 0.4.5 milestone Jun 5, 2018
@joke2k
Copy link
Owner

joke2k commented Jun 5, 2018

See #148

@joke2k joke2k added help wanted Extra attention is needed ci/cd CI/CD related stuff labels Jun 5, 2018
@sergeyklay sergeyklay removed the ci/cd CI/CD related stuff label Aug 31, 2021
@sergeyklay sergeyklay removed this from the Road to 0.4.5 milestone Sep 1, 2021
@sergeyklay sergeyklay deleted the branch joke2k:develop September 4, 2021 12:00
@sergeyklay sergeyklay closed this Sep 4, 2021
@sergeyklay sergeyklay reopened this Sep 4, 2021
@sergeyklay
Copy link
Collaborator

PR was closed by mistake. Reopened it.

@sergeyklay sergeyklay deleted the branch joke2k:develop October 19, 2021 21:45
@sergeyklay sergeyklay closed this Oct 19, 2021
@sergeyklay
Copy link
Collaborator

This is resolved in develop branch and released in v0.8.0. Thank you for the patch, and for helping us make django-environ better. And I am sorry about the delay.

@sergeyklay sergeyklay added enhancement New feature or request and removed help wanted Extra attention is needed labels Oct 20, 2021
@sergeyklay sergeyklay self-assigned this Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants