Update docs for dotenv env_file not checking parent directories (#4150)

This commit is contained in:
Amin Alaee
2022-07-14 18:39:28 +02:00
committed by GitHub
parent f529e0d354
commit 228e46de35
+4
View File
@@ -148,6 +148,10 @@ In either case, the value of the passed argument can be any valid path or filena
current working directory. From there, *pydantic* will handle everything for you by loading in your variables and
validating them.
!!! note
If a filename is specified for `env_file`, Pydantic will only check the current working directory and
won't check any parent directories for the `.env` file.
Even when using a dotenv file, *pydantic* will still read environment variables as well as the dotenv file,
**environment variables will always take priority over values loaded from a dotenv file**.