Parameter
No overview available.
Attributes
| Attribute | Type | Description |
|---|---|---|
| positional | bool | Indicates whether the parameter is passed by position rather than by keyword. |
| name | PyBackedStr | The internal identifier for the parameter used within the validation logic and error reporting. |
| kwarg_key | Option< Py< PyString > > | The specific string key used to extract this parameter from a dictionary of keyword arguments. |
| validator | Arc< CombinedValidator > | The validation logic applied to the input value to ensure it meets the parameter's schema requirements. |
| lookup_path_collection | Option< 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
| Name | Type | Description |
|---|---|---|
| positional | bool | Whether the parameter is positional-only. |
| name | PyBackedStr | The name of the parameter. |
| kwarg_key | Option< Py< PyString > > | The key used for keyword arguments, if applicable. |
| validator | Arc< CombinedValidator > | The validator used to process the parameter value. |
| lookup_path_collection | Option< 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
| Type | Description |
|---|---|
boolean | True 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
| Type | Description |
|---|---|
string | The 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
| Type | Description |
|---|---|
| `string | null` |
validator()
def validator() - > [CombinedValidator](../mod/combinedvalidator.md?sid=validators_mod_combinedvalidator)
The validation logic applied to the input value provided for this parameter.
Returns
| Type | Description |
|---|---|
[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
| Type | Description |
|---|---|
| `LookupPathCollection | null` |