Skip to content

Complex types for command line arguments and environment variables #16

@silvanmelchior

Description

@silvanmelchior

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions