Hi, what do you think of adding a tyro.conf.Env to the available annotations?
It would be used something like this:
@dataclasses.dataclass
class ServerConfig:
# Env var name derived automatically from field name. Required.
secret: Annotated[str, tyro.conf.Env()]
# Falls back to HOST env var if --host is not passed.
host: Annotated[str, tyro.conf.Env()] = "localhost"
# Explicit env var name overrides derivation.
port: Annotated[int, tyro.conf.Env("APP_PORT")] = 8080
Priority would be: hardcoded < environment < flags.
Hi, what do you think of adding a
tyro.conf.Envto the available annotations?It would be used something like this:
Priority would be:
hardcoded < environment < flags.