ORIONIS API REFERENCE

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_init__ Validate and normalize the argument definition.
Method addToParser 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_or_flags 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 _cachedFieldMetadata Retrieve field definitions and normalized types cached by class.
Method __init__ Initialize declared fields and public extra attributes.
Method _dynamicAttributes Return public instance attributes that are not declared fields.
Method _validateExtraNames Validate names and storage for public extra attributes.
Method getFields Describe declared fields and, optionally, dynamic attributes.
Method toDict 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_field_metadata Cache declared fields and normalized type names for each concrete class.
def __post_init__(self): (source)

Validate and normalize the argument definition.

Ensures that all fields are valid and normalized for use with argparse.ArgumentParser.

Returns
NoneThis method does not return a value.
def addToParser(self, parser: argparse.ArgumentParser): (source)

Add this argument to an ArgumentParser.

Registers the argument with the provided parser using the stored configuration.

Parameters
parser:argparse.ArgumentParserParser instance where the argument will be registered.
Returns
NoneThis method does not return a value.
action: str | orionis.console.enums.ArgumentAction | None, optional = (source)

Action to perform when the argument is encountered.

Allowed values for the argument.

const: typing.Any, optional = (source)

Constant value used by actions like 'store_const'.

default: typing.Any, optional = (source)

Default value if the argument is not provided.

dest: str | None, optional = (source)

Attribute name where the parsed value is stored.

extra: dict[str, typing.Any], optional = (source)

Additional parameters forwarded to add_argument.

help: str | None, optional = (source)

Help text for the argument.

metavar: str | tuple[str, ...] | None, optional = (source)

Name used in help messages.

name_or_flags: str | collections.abc.Iterable[str] = (source)

Name or flags for the argument (e.g. "--file" or ("-f", "--file")).

nargs: int | str | None, optional = (source)

Number of arguments to consume ('?', '*', '+', or integer).

required: bool, optional = (source)

Whether the argument is required.

Function used to convert the argument value.

version: str | None, optional = (source)

Version string used with action="version".