Lambda
LambdaExtract
Bases: ExtractionMethod
Description: Accepts a dictionary. String values are popped from the dictionary and
are put back into the dictionary with the key specified.
Method name: lambda
Example Configuration
.. code-block:: yaml
- method: lambda
inputs:
function: 'lambda x: x * x'
args:
- hello
- $world
kwargs:
hello: world
goodbye: all
Source code in extraction_methods/plugins/lambda.py
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | |
LambdaInput
Bases: Input
Model for Lambda Input.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
function
|
str
|
lambda function to be run. |
required |
args
|
list[Any]
|
list of arguments for function. |
[]
|
kwargs
|
dict[str, Any]
|
dictionary of key word arguments for function. |
{}
|
output_key
|
str
|
key to output to. |
'label'
|
Source code in extraction_methods/plugins/lambda.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | |