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
Represent a command-line argument definition.
This entity encapsulates the configuration required to register an argument in an argparse.ArgumentParser.
| Method | __post |
Validate and normalize the argument definition. |
| Method | add |
Add this argument to an ArgumentParser. |
| Instance Variable | action |
Action to perform when the argument is encountered. |
| Instance Variable | choices |
Allowed values for the argument. |
| Instance Variable | const |
Constant value used by actions like 'store_const'. |
| Instance Variable | default |
Default value if the argument is not provided. |
| Instance Variable | dest |
Attribute name where the parsed value is stored. |
| Instance Variable | extra |
Additional parameters forwarded to add_argument. |
| Instance Variable | help |
Help text for the argument. |
| Instance Variable | metavar |
Name used in help messages. |
| Instance Variable | name |
Name or flags for the argument (e.g. "--file" or ("-f", "--file")). |
| Instance Variable | nargs |
Number of arguments to consume ('?', '*', '+', or integer). |
| Instance Variable | required |
Whether the argument is required. |
| Instance Variable | type_ |
Function used to convert the argument value. |
| Instance Variable | version |
Version string used with action="version". |
Inherited from BaseEntity:
| Class Method | _cached |
Retrieve field definitions and normalized types cached by class. |
| Method | __init__ |
Initialize declared fields and public extra attributes. |
| Method | _dynamic |
Return public instance attributes that are not declared fields. |
| Method | _validate |
Validate names and storage for public extra attributes. |
| Method | get |
Describe declared fields and, optionally, dynamic attributes. |
| Method | to |
Return a recursively copied dictionary of declared and extra values. |
| Class Variable | __slots__ |
Declare that this class introduces no additional instance slots. |
| Class Variable | _orionis |
Cache declared fields and normalized type names for each concrete class. |
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. |