4 ms·
I use Pydantic Settings for this, would be nice to see a comparison to that. I do like the idea of keeping this in a configuration file.
by qntty 2mo ago
I use Pydantic Settings for this, would be nice to see a comparison to that. I do like the idea of keeping this in a configuration file.
- triyambakam 2mo agoYeah Pydantic Settings is pretty nice
- domenkozar 2mo agoTwo things: - Secrets don't belong in config https://secretspec.dev/blog/secrets-dont-belong-in-config/ https://secretspec.dev/blog/secrets-dont-belong-in-config/ - You want to have flexibility of choosing between any secrets provider: https://secretspec.dev/blog/but-i-use-sops/ https://secretspec.dev/blog/but-i-use-sops/
- tomjakubowski 2mo agopydantic-settings is not limited to loading from config files. It is easy to populate a settings model from environment variables, for example. With a little bit of glue code it could load from the secretspec sdk.
- eigencoder 2mo agoBut secrets are a kind of configuration, right? I agree they should be kept separate from non-secret config; ideally non-secret configuration can be committed to your codebase somewhere depending on the environment it's running in.