THE ORIONIS API
Build with clarity.
Explore the building blocks of an async-first Python framework. Every module, class, and method — connected, searchable, and ready to build with.
class documentation
class Argument(BaseEntity): (source)
Represent a command-line argument definition.
This entity encapsulates the configuration required to register an argument in an argparse.ArgumentParser.
| Parameters | |
| name | Name or flags for the argument (e.g. "--file" or ("-f", "--file")). |
| action | Action to perform when the argument is encountered. |
| nargs | Number of arguments to consume ('?', '*', '+', or integer). |
| const | Constant value used by actions like 'store_const'. |
| default | Default value if the argument is not provided. |
| type_ | Function used to convert the argument value. |
| choices | Allowed values for the argument. |
| required | Whether the argument is required. |
| help | Help text for the argument. |
| metavar | Name used in help messages. |
| dest | Attribute name where the parsed value is stored. |
| version | Version string used with action="version". |
| extra | Additional parameters forwarded to add_argument. |
| Method | __post |
Validate and normalize the argument definition. |
| Method | add |
Add this argument to an ArgumentParser. |
| Class Variable | action |
Undocumented |
| Class Variable | choices |
Undocumented |
| Class Variable | const |
Undocumented |
| Class Variable | default |
Undocumented |
| Class Variable | dest |
Undocumented |
| Class Variable | extra |
Undocumented |
| Class Variable | help |
Undocumented |
| Class Variable | metavar |
Undocumented |
| Class Variable | name |
Undocumented |
| Class Variable | nargs |
Undocumented |
| Class Variable | required |
Undocumented |
| Class Variable | type_ |
Undocumented |
| Class Variable | version |
Undocumented |
Inherited from BaseEntity:
| Class Method | _cached |
Retrieve field definitions and normalized types cached by class. |
| Method | get |
Describe field names, normalized types, defaults, and metadata. |
| Method | to |
Convert the dataclass instance to a recursively copied dictionary. |
| Class Variable | __slots__ |
Undocumented |
Validate and normalize the argument definition.
Ensures that all fields are valid and normalized for use with argparse.ArgumentParser.
| Returns | |
None | This method does not return a value. |
Add this argument to an ArgumentParser.
Registers the argument with the provided parser using the stored configuration.
| Parameters | |
parser:argparse.ArgumentParser | Parser instance where the argument will be registered. |
| Returns | |
None | This method does not return a value. |