General function
GeneralFunctionExtract
Bases: ExtractionMethod
Accepts a dictionary. String values are popped from the dictionary and
are put back into the dictionary with the key specified.
Method name: general_function
Example Configuration
.. code-block:: yaml
- method: general_function
inputs:
funtion:import.path.to.the.fuction
args:
- hello
- world
kwargs:
hello: world
foo: bar
Source code in extraction_methods/plugins/general_function.py
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 82 83 84 85 86 87 88 89 90 91 | |
GeneralFunctionInput
Bases: Input
Model for General Fuction Input.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
function
|
str
|
Function to be run name can be seperatated by delimieter. |
required |
delimiter
|
str
|
text delimiter to put between module/function names. |
'.'
|
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, else response will be merged with body. |
''
|
Source code in extraction_methods/plugins/general_function.py
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 | |