signature
Create new signature.
- if the first argument is a signature already then it's cloned.
- if the first argument is a dict, then a Signature version is returned.
Returns:
Signature: The resulting signature.
def signature(
varies: Union[dict, Signature, str, Callable],
*args: Any,
**kwargs: Any
) - > Signature
Create new signature. - if the first argument is a signature already then it's cloned. - if the first argument is a dict, then a Signature version is returned.
Parameters
| Name | Type | Description |
|---|---|---|
| varies | Union[dict, Signature, str, Callable] | The base object used to create the signature; can be an existing Signature to clone, a dictionary representation, or a task name/callable. |
| *args | Any | Positional arguments to be passed to the Signature constructor if the first argument is not a dictionary. |
| **kwargs | Any | Keyword arguments for the Signature constructor, including the optional 'app' instance for context. |
Returns
| Type | Description |
|---|---|
Signature | The resulting signature object, either cloned from an existing one, reconstructed from a dictionary, or newly initialized. |