Skip to main content

Parameter

No overview available.

Attributes

AttributeTypeDescription
positionalboolIndicates whether the parameter is passed by position rather than by keyword.
namePyBackedStrThe internal identifier for the parameter used within the validation logic and error reporting.
kwarg_keyOption< Py< PyString > >The specific string key used to extract this parameter from a dictionary of keyword arguments.
validatorArc< CombinedValidator >The validation logic applied to the input value to ensure it meets the parameter's schema requirements.
lookup_path_collectionOption< LookupPathCollection >A collection of paths used to locate the parameter value, only populated for keyword or positional-or-keyword parameters.

Constructor

Signature

def Parameter(
positional: bool,
name: PyBackedStr,
kwarg_key: Option< Py< PyString > >,
validator: Arc< CombinedValidator >,
lookup_path_collection: Option< LookupPathCollection >
) - > null

Parameters

NameTypeDescription
positionalboolWhether the parameter is positional-only.
namePyBackedStrThe name of the parameter.
kwarg_keyOption< Py< PyString > >The key used for keyword arguments, if applicable.
validatorArc< CombinedValidator >The validator used to process the parameter value.
lookup_path_collectionOption< LookupPathCollection >Optional collection of lookup paths for keyword or positional-or-keyword parameters.

Methods


positional()

def positional() - > boolean

Indicates whether the parameter is a positional-only argument in the function signature.

Returns

TypeDescription
booleanTrue if the parameter must be passed positionally, False otherwise.

name()

def name() - > string

The identifier of the parameter as defined in the Python source code.

Returns

TypeDescription
stringThe string representation of the parameter name.

kwarg_key()

def kwarg_key() - > string|null

The key used for keyword argument lookup if the parameter supports keyword-based passing.

Returns

TypeDescription
`stringnull`

validator()

def validator() - > [CombinedValidator](../mod/combinedvalidator.md?sid=validators_mod_combinedvalidator)

The validation logic applied to the input value provided for this parameter.

Returns

TypeDescription
[CombinedValidator](../mod/combinedvalidator.md?sid=validators_mod_combinedvalidator)An atomic reference to the validator instance responsible for enforcing type and constraint checks.

lookup_path_collection()

def lookup_path_collection() - > LookupPathCollection|null

The collection of paths used to locate the parameter value within input data for keyword or mixed parameters.

Returns

TypeDescription
`LookupPathCollectionnull`