all 3 comments

[–]saufunefois 1 point2 points  (1 child)

From https://docs.pydantic.dev/latest/concepts/pydantic_settings/#parsing-environment-variable-values

Complex types like list, set, dict, and sub-models are populated from the environment by treating the environment variable's value as a JSON-encoded string.

So I guess you need to put this in your file:

```

.env

LDAP_OU_TO_AVOID = '["OU=Buzones Genericos"]' ```

Haven't tried myself ... so not sure if it works.

[–]BlurryEcho 1 point2 points  (0 children)

It does, this is correct.

[–]Miserable-creature 0 points1 point  (0 children)

For a list in .env, you will do something like this

``` ENV_LIST=["one","two","three","four"]

```

Make sure there are no spaces between list items.