class Setting[A]
A global flag read in handlers as a service. Subclass it with the
flag; yield from Region() reads the value::
class Region(Setting[str | None]):
flag = Flag.string("region").optional()Command.pipe(with_global_flags(Region)) makes the command (and its
subcommands) accept --region and provides Region.
Attributes#
| Attribute | Type | Description |
|---|---|---|
flag | Flag[Any] |
On This Page
Attributes