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
.env file like crea when using BaseSettings #607
Labels
Comments
4 tasks
samuelcolvin
added a commit
that referenced
this issue
Jan 19, 2020
* allow use of a `.env`-style files in BaseSettings (#607) * address various issues with initial implementation - allow specifying `_env_file` kwarg in instantiation * overrides any `env_file` specified in the `Config` class - cast `os.environ` as a dict for better consistenty of behavior - `env_path` should be a `Path` type - replace `with open()` with `read_text` - use regex for parsing the dotenv files and throw error on invalid line - factor out `read_env_file` into separate file for easier testing * move back into a single file; revert typing changes; use regex better * pass `_env_file` argument around instead of setting a class attribute * add dotenv docs * add dotenv tests * Add changes file * Flesh out the docs a bit * Apply suggestions from @samuelcolvin's code review Co-Authored-By: Samuel Colvin <samcolvin@gmail.com> * wrap docs * add not about priority * fix tests and imports * fix tests * switch to python-dotenv * cleanup, test example * more docs tweaks * typo * fix tests for dotenv Co-authored-by: Samuel Colvin <samcolvin@gmail.com>
Looks like this can be closed since #1011 is merged? |
Yes, see directly above. Will be released soon. Sorry, misread your comment. Closed. |
alexdrydew
pushed a commit
to alexdrydew/pydantic
that referenced
this issue
Dec 23, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
so secrets can be kept out of git without having to always activate an environment.
The text was updated successfully, but these errors were encountered: