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

Support prefix in environ.Env #362

Closed
arturponinski opened this issue Jan 28, 2022 · 3 comments
Closed

Support prefix in environ.Env #362

arturponinski opened this issue Jan 28, 2022 · 3 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@arturponinski
Copy link
Contributor

Sometimes it is desirable to be able to prefix all environment variables. pydantic offers this in this manner:

    class Config:
        env_prefix = 'my_prefix_'  # defaults to no prefix, i.e. ""

Ideally, something like this can be implemented:

import environ

env = environ.Env()
env.prefix = "PREFIX_"
@ecugol
Copy link

ecugol commented Feb 6, 2022

Just thought about the same thing. Could be very useful for multiple apps running on the same env.

@jayvdb
Copy link

jayvdb commented Apr 13, 2022

This is a feature of environs which is quite handy.
https://github.com/sloria/environs#handling-prefixes

@sergeyklay sergeyklay added the enhancement New feature or request label Jun 13, 2022
@sergeyklay sergeyklay self-assigned this Jun 13, 2022
@sergeyklay sergeyklay added the good first issue Good for newcomers label Jun 13, 2022
@sergeyklay
Copy link
Collaborator

Implemented in #363

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants