Closed
Description
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_"
Metadata
Metadata
Assignees
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
ecugol commentedon Feb 6, 2022
Just thought about the same thing. Could be very useful for multiple apps running on the same env.
jayvdb commentedon Apr 13, 2022
This is a feature of
environs
which is quite handy.https://github.com/sloria/environs#handling-prefixes
sergeyklay commentedon Jun 13, 2022
Implemented in #363