r/FastAPI • u/Doggart193 • Aug 28 '24
Question [HELP] Pydantic - Setting Class
Hi, I need to read lists from a .env file for the following settings:
class Settings(BaseSettings):
...
ldap_search_bases: List[str]
ldap_ou_to_avoid: List[str]
ldap_attr_to_retrieve: List[str]How can I set these lists in the .env file?
For example:
LDAP_OU_TO_AVOID = ["OU=Buzones Genericos"]
3
Upvotes
View all comments
Show parent comment
2
u/BlurryEcho Aug 29 '24
It does, this is correct.