Skip to content
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

Complex types for command line arguments and environment variables #16

Open
silvanmelchior opened this issue Oct 20, 2021 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@silvanmelchior
Copy link
Collaborator

By their nature, command line arguments and environment variables only support strings. Pydantic then casts them to other primitives, e.g. an integer. However, it is not possible to far to define more complex types, e.g. a list or a dictionary. It would be interesting to support this as well.

Whereas lists for command line arguments could be realised by passing the same argument multiple times with potentially different values, it is not clear how this would work for environment variables and how other types like dicts would be realised. One possibility would be a special encoding (e.g. json), but this would then have to be parsed explicitly by confz before calling pydantic.

@silvanmelchior silvanmelchior added the enhancement New feature or request label Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant