Function Pods
Function pods wrap Python functions to transform individual data in a stream.
FunctionPod
Section titled “FunctionPod”class · orcapod.core.function_pod.FunctionPod
class FunctionPod( data_function: DataFunctionProtocol, pod_config: PodConfig | None = None, ctx_arg_name: str | None = None, **kwargs,)Bases: _FunctionPodBase
from_fn
Section titled “from_fn”classmethod · orcapod.core.function_pod.FunctionPod.from_fn
def from_fn( fn: Callable, output_keys: list[str] | str, *, ctx_arg_name: str | None = None, name: str | None = None, version: str = 'v0.0', pod_config: PodConfig | None = None, label: str | None = None, **kwargs: Any,) -> 'FunctionPod'Construct a FunctionPod directly from a callable.
When ctx_arg_name is set, the named parameter is excluded from the
pod's exposed input_data_schema and auto-injected with a per-row
InvocationContext at process_data time. The full function
signature (including ctx_arg_name) is retained in the underlying
PythonDataFunction for correct identity hashing.
Parameters:
- fn (
Callable): The user function. - output_keys (
list[str] | str): Output column key(s). - ctx_arg_name (
str | None) defaultNone: If set, exclude this parameter from the exposed input schema and inject anInvocationContextper row under this name. - name (
str | None) defaultNone: Optional canonical function name override. - version (
str) default'v0.0': Version string (default"v0.0", as for every entry point). - pod_config (
PodConfig | None) defaultNone: Optional per-pod config. - label (
str | None) defaultNone: Optional display label. - **kwargs (
Any) default{}: Forwarded to_FunctionPodBase.__init__.
Returns:
'FunctionPod': A newFunctionPod.
pod_config
Section titled “pod_config”property · orcapod.core.function_pod.FunctionPod.pod_config
Type: PodConfig
Per-pod executor configuration.
process
Section titled “process”method · orcapod.core.function_pod.FunctionPod.process
def process(*streams: StreamProtocol, label: str | None = None) -> FunctionPodStreamInvoke the data processor on the input stream(s).
Parameters:
- *streams (
StreamProtocol) default(): Input streams to process. - label (
str | None) defaultNone: Optional label for tracking.
Returns:
FunctionPodStream: AFunctionPodStreamwrapping the computation.
to_config
Section titled “to_config”method · orcapod.core.function_pod.FunctionPod.to_config
def to_config() -> dict[str, Any]Serialize this function pod to a JSON-compatible config dict.
Returns:
dict[str, Any]: A JSON-serializable dict containing the URI, data function config,dict[str, Any]: and pod config for this function pod.
from_config
Section titled “from_config”classmethod · orcapod.core.function_pod.FunctionPod.from_config
def from_config( config: dict[str, Any], *, fallback_to_proxy: bool = False,) -> 'FunctionPod'Reconstruct a FunctionPod from a config dict.
Parameters:
- config (
dict[str, Any]): A dict as produced byto_config. - fallback_to_proxy (
bool) defaultFalse: IfTrueand the data function cannot be resolved, use aDataFunctionProxyinstead of raising.
Returns:
'FunctionPod': A newFunctionPodinstance.
function_pod
Section titled “function_pod”function · orcapod.core.function_pod.function_pod
def function_pod( output_keys: str | Sequence[str] | None = None, function_name: str | None = None, version: str = 'v0.0', label: str | None = None, ctx_arg: str | None = None, result_database: ArrowDatabaseProtocol | None = None, pod_cache_database: ArrowDatabaseProtocol | None = None, executor: DataFunctionExecutorProtocol | None = None, post_run_hooks: Sequence[PostRunHook] | None = None, **kwargs: Any,) -> Callable[..., CallableWithPodProtocol]Decorator that attaches a FunctionPod as a pod attribute.
Parameters:
- output_keys (
str | Sequence[str] | None) defaultNone: Keys for the function output(s). - function_name (
str | None) defaultNone: Name of the function pod; defaults tofunc.__name__. - version (
str) default'v0.0': Version string for the data function. - label (
str | None) defaultNone: Optional label for tracking. - result_database (
ArrowDatabaseProtocol | None) defaultNone: Optional database for data-level caching (wraps the data function inCachedDataFunction). - pod_cache_database (
ArrowDatabaseProtocol | None) defaultNone: Optional database for pod-level caching (wraps the pod inCachedFunctionPod, which caches at theprocess_datalevel using input data content hash). - executor (
DataFunctionExecutorProtocol | None) defaultNone: Optional executor for running the data function. - post_run_hooks (
Sequence[PostRunHook] | None) defaultNone: Optional list of post-run hooks to register on the pod after construction. Each entry is either a plain callable(PostRunPayload) -> Noneor aHookConfig. - **kwargs (
Any) default{}: Forwarded toPythonDataFunction.
Returns:
Callable[..., CallableWithPodProtocol]: A decorator that adds apodattribute to the wrapped function.
SideEffectPod
Section titled “SideEffectPod”class · orcapod.side_effects.SideEffectPod
class SideEffectPod( fn: Callable, config: SideEffectPodConfig | None = None, tracker_manager: TrackerManagerProtocol | None = None, name: str | None = None, label: str | None = None, data_context: Any = None, ctx_arg_name: str = 'ctx',)Bases: TraceableBase
A pipeline node whose primary purpose is a side effect.
Wraps a (data: T, ctx: InvocationContext) -> None callable.
InvocationContext is always constructed and passed — it is part of
the function contract. Callees that do not need it may ignore it (name
the parameter _ctx by convention).
Returns a pass-through stream. When drop_on_failure=True, only
successfully-delivered rows flow downstream.
In standalone mode (no PipelineJob), executes row-by-row via
SideEffectPodStream with no invocation logging.
In pipeline mode, promoted to SideEffectJobNode at compile time,
which adds DB-backed invocation logging and completion tracking. A job
delivers only when it runs (job.run() or the node's run()); every
read of the node returns the rows its last run passed on and delivers
nothing (ITL-1091).
Parameters:
- fn (
Callable): A callable(data, ctx: InvocationContext) -> None. - config (
SideEffectPodConfig | None) defaultNone: Pod-level configuration. Defaults toSideEffectPodConfig(). - tracker_manager (
TrackerManagerProtocol | None) defaultNone: Optional tracker manager override. - name (
str | None) defaultNone: Optional canonical function name used inuriand the invocation-log table path. Defaults tofn.__name__. - label (
str | None) defaultNone: Optional display label (separate fromname). - data_context (
Any) defaultNone: Optional data context override.
ctx_arg_name
Section titled “ctx_arg_name”property · orcapod.side_effects.SideEffectPod.ctx_arg_name
Type: str
Parameter name injected with InvocationContext on each call.
pod_config
Section titled “pod_config”property · orcapod.side_effects.SideEffectPod.pod_config
Type: SideEffectPodConfig
Pod-level configuration.
canonical_function_name
Section titled “canonical_function_name”property · orcapod.side_effects.SideEffectPod.canonical_function_name
Type: str
Human-readable function identifier, defaults to fn.__name__.
computed_label
Section titled “computed_label”method · orcapod.side_effects.SideEffectPod.computed_label
def computed_label() -> str | NoneUse the callable's __name__ as the default label.
property · orcapod.side_effects.SideEffectPod.uri
Type: tuple[str, ...]
Canonical URI for this pod: ("side_effects", canonical_function_name).
argument_symmetry
Section titled “argument_symmetry”method · orcapod.side_effects.SideEffectPod.argument_symmetry
def argument_symmetry(streams: Collection[StreamProtocol]) -> AnySingle ordered input — return as an ordered tuple.
output_schema
Section titled “output_schema”method · orcapod.side_effects.SideEffectPod.output_schema
def output_schema( *streams: StreamProtocol, columns: ColumnConfig | dict[str, Any] | None = None, all_info: bool = False,) -> tuple[Schema, Schema]Return the input stream's schema unchanged (pass-through).
Parameters:
- *streams (
StreamProtocol) default(): Exactly one input stream. - columns (
ColumnConfig| dict[str, Any] | None) defaultNone: Optional column config. - all_info (
bool) defaultFalse: Include all metadata columns.
Returns:
process
Section titled “process”method · orcapod.side_effects.SideEffectPod.process
def process(*streams: StreamProtocol, label: str | None = None) -> SideEffectPodStreamInvoke the side-effect pod on the input stream.
Registers a SideEffectInvocation with the tracker manager (if
inside a with PipelineJob(): block), then returns a
SideEffectPodStream for standalone / lazy execution.
Parameters:
- *streams (
StreamProtocol) default(): Exactly one input stream. - label (
str | None) defaultNone: Optional label for the compiled node.
Returns:
SideEffectPodStream: ASideEffectPodStream.
side_effect_pod
Section titled “side_effect_pod”function · orcapod.side_effects.side_effect_pod
def side_effect_pod( fn: Callable | None = None, *, config: SideEffectPodConfig | None = None, name: str | None = None, ctx_arg_name: str = 'ctx',) -> SideEffectPod | Callable[[Callable], SideEffectPod]Decorator that wraps a callable as a SideEffectPod.
Supports both bare (@side_effect_pod) and parameterised
(@side_effect_pod(config=...)) usage.
Parameters:
- fn (
Callable | None) defaultNone: The callable to wrap (when used as a bare decorator). - config (
SideEffectPodConfig | None) defaultNone: OptionalSideEffectPodConfigto apply. - name (
str | None) defaultNone: Optional canonical function name override (seeSideEffectPod). - ctx_arg_name (
str) default'ctx': Name of the parameter that receivesInvocationContext. Defaults to"ctx".
Returns:
SideEffectPod| Callable[[Callable],SideEffectPod]: ASideEffectPod(bare usage) or a decorator (parameterised usage).
sink_pod
Section titled “sink_pod”function · orcapod.side_effects.sink_pod
def sink_pod( fn: Callable | None = None, *, config: SideEffectPodConfig | None = None, name: str | None = None, ctx_arg_name: str = 'ctx',) -> SideEffectPod | Callable[[Callable], SideEffectPod]Decorator preset: track_completion=True, drop_on_failure=True.
Caller-supplied config fields override the presets. Supports both
bare (@sink_pod) and parameterised (@sink_pod(config=...)) usage.
Parameters:
- fn (
Callable | None) defaultNone: The callable to wrap (bare usage). - config (
SideEffectPodConfig | None) defaultNone: Optional config override. - name (
str | None) defaultNone: Optional canonical function name override (seeSideEffectPod). - ctx_arg_name (
str) default'ctx': Name of the parameter that receivesInvocationContext. Defaults to"ctx".
Returns:
SideEffectPod| Callable[[Callable],SideEffectPod]: ASideEffectPodor decorator.
tap_pod
Section titled “tap_pod”function · orcapod.side_effects.tap_pod
def tap_pod( fn: Callable | None = None, *, config: SideEffectPodConfig | None = None, name: str | None = None, ctx_arg_name: str = 'ctx',) -> SideEffectPod | Callable[[Callable], SideEffectPod]Decorator preset: track_completion=False, drop_on_failure=False.
Caller-supplied config fields override the presets. Supports both
bare (@tap_pod) and parameterised (@tap_pod(config=...)) usage.
Parameters:
- fn (
Callable | None) defaultNone: The callable to wrap (bare usage). - config (
SideEffectPodConfig | None) defaultNone: Optional config override. - name (
str | None) defaultNone: Optional canonical function name override (seeSideEffectPod). - ctx_arg_name (
str) default'ctx': Name of the parameter that receivesInvocationContext. Defaults to"ctx".
Returns:
SideEffectPod| Callable[[Callable],SideEffectPod]: ASideEffectPodor decorator.
PythonDataFunction
Section titled “PythonDataFunction”class · orcapod.core.data_function.PythonDataFunction
class PythonDataFunction( function: Callable[..., Any], output_keys: str | Sequence[str] | None = None, function_name: str | None = None, version: str = 'v0.0', input_schema: SchemaLike | None = None, output_schema: SchemaLike | Sequence[type] | None = None, label: str | None = None, data_context: str | DataContext | None = None, config: OrcapodConfig | None = None, executor: PythonFunctionExecutorProtocol | None = None,)Bases: DataFunctionBase[PythonFunctionExecutorProtocol]
data_function_type_id
Section titled “data_function_type_id”property · orcapod.core.data_function.PythonDataFunction.data_function_type_id
Type: str
Unique function type identifier.
canonical_function_name
Section titled “canonical_function_name”property · orcapod.core.data_function.PythonDataFunction.canonical_function_name
Type: str
Human-readable function identifier.
get_function_variation_data
Section titled “get_function_variation_data”method · orcapod.core.data_function.PythonDataFunction.get_function_variation_data
def get_function_variation_data() -> dict[str, Any]Raw data defining function variation, stored with every result row.
function_version is the full version string the function was declared
with ("v3.7"); only its major part is in the table path.
get_function_variation_data_schema
Section titled “get_function_variation_data_schema”method · orcapod.core.data_function.PythonDataFunction.get_function_variation_data_schema
def get_function_variation_data_schema() -> SchemaSchema for the data returned by get_function_variation_data.
get_execution_data
Section titled “get_execution_data”method · orcapod.core.data_function.PythonDataFunction.get_execution_data
def get_execution_data() -> dict[str, Any]Raw data defining execution context.
get_execution_data_schema
Section titled “get_execution_data_schema”method · orcapod.core.data_function.PythonDataFunction.get_execution_data_schema
def get_execution_data_schema() -> SchemaSchema for the data returned by get_execution_data.
input_data_schema
Section titled “input_data_schema”property · orcapod.core.data_function.PythonDataFunction.input_data_schema
Type: Schema
Schema describing the input data this function accepts.
output_data_schema
Section titled “output_data_schema”property · orcapod.core.data_function.PythonDataFunction.output_data_schema
Type: Schema
Schema describing the output data this function produces.
is_active
Section titled “is_active”method · orcapod.core.data_function.PythonDataFunction.is_active
def is_active() -> boolReturn whether the function is active (will process data).
set_active
Section titled “set_active”method · orcapod.core.data_function.PythonDataFunction.set_active
def set_active(active: bool = True) -> NoneSet the active state. If False, call returns None for every data.
is_async
Section titled “is_async”property · orcapod.core.data_function.PythonDataFunction.is_async
Type: bool
Return whether the wrapped function is an async coroutine function.
method · orcapod.core.data_function.PythonDataFunction.call
def call( data: DataProtocol, *, logger: DataExecutionLoggerProtocol | None = None, **kwargs: Any,) -> DataProtocol | NoneProcess a single data, routing through the executor if one is set.
When an executor implementing PythonFunctionExecutorProtocol is
set, the raw callable and call dict are handed to execute_callable
which captures I/O and records to the logger.
Parameters:
- data (
DataProtocol): The input data to process. - logger (
DataExecutionLoggerProtocol | None) defaultNone: Optional logger for I/O capture. - **kwargs (
Any) default{}: Extra keyword arguments merged withdata.as_dict()before invoking the function. Pods use this to supply auto-provided arguments (e.g.InvocationContext) that are not part of the data schema.
async_call
Section titled “async_call”method · orcapod.core.data_function.PythonDataFunction.async_call
async def async_call( data: DataProtocol, *, logger: DataExecutionLoggerProtocol | None = None, **kwargs: Any,) -> DataProtocol | NoneAsync counterpart of call.
direct_call
Section titled “direct_call”method · orcapod.core.data_function.PythonDataFunction.direct_call
def direct_call(data: DataProtocol, **kwargs: Any) -> DataProtocol | NoneExecute the function on data synchronously (no executor path).
On user-function failure the exception is re-raised.
For async functions, the coroutine is driven to completion via
asyncio.run() (or a helper thread when already inside an event loop).
Parameters:
- data (
DataProtocol): The input data to process. - **kwargs (
Any) default{}: Extra keyword arguments merged withdata.as_dict()before invoking the function.
direct_async_call
Section titled “direct_async_call”method · orcapod.core.data_function.PythonDataFunction.direct_async_call
async def direct_async_call(data: DataProtocol, **kwargs: Any) -> DataProtocol | NoneExecute the function on data asynchronously (no executor path).
Async functions are await-ed directly. Sync functions are
offloaded to a thread pool via run_in_executor. On failure,
the exception is re-raised.
Parameters:
- data (
DataProtocol): The input data to process. - **kwargs (
Any) default{}: Extra keyword arguments merged withdata.as_dict()before invoking the function.
to_config
Section titled “to_config”method · orcapod.core.data_function.PythonDataFunction.to_config
def to_config() -> dict[str, Any]Serialize this data function to a JSON-compatible config dict.
Returns:
dict[str, Any]: A dict withdata_function_type_idand a nestedconfigdict[str, Any]: containing enough information to reconstruct this instance viadict[str, Any]:from_config.
from_config
Section titled “from_config”classmethod · orcapod.core.data_function.PythonDataFunction.from_config
def from_config(config: dict[str, Any]) -> 'PythonDataFunction'Reconstruct a PythonDataFunction by importing the callable.
Parameters:
- config (
dict[str, Any]): A dict as produced byto_config.
Returns:
'PythonDataFunction': A newPythonDataFunctionwrapping the imported callable.
Raises:
ImportError: If the module specified in config cannot be imported.AttributeError: If the callable name does not exist in the module.
CachedDataFunction
Section titled “CachedDataFunction”class · orcapod.core.data_function.CachedDataFunction
class CachedDataFunction( data_function: DataFunctionProtocol, result_database: ArrowDatabaseProtocol, record_path_prefix: tuple[str, ...] = (), **kwargs,)Bases: DataFunctionWrapper
Wrapper around a DataFunctionProtocol that caches results for identical input data.
Uses a shared ResultCache for lookup/store/conflict-resolution
logic (same mechanism as CachedFunctionPod).
result_database
Section titled “result_database”property · orcapod.core.data_function.CachedDataFunction.result_database
Type: ArrowDatabaseProtocol
The database this function's results are cached in.
set_auto_flush
Section titled “set_auto_flush”method · orcapod.core.data_function.CachedDataFunction.set_auto_flush
def set_auto_flush(on: bool = True) -> NoneSet auto-flush behavior. If True, the database flushes after each record.
record_path
Section titled “record_path”property · orcapod.core.data_function.CachedDataFunction.record_path
Type: tuple[str, ...]
Return the path to the cached records in the result database (versioned).
method · orcapod.core.data_function.CachedDataFunction.call
def call( data: DataProtocol, *, logger: DataExecutionLoggerProtocol | None = None, skip_cache_lookup: bool = False, skip_cache_insert: bool = False, **kwargs: Any,) -> DataProtocol | NoneLook up cache keyed on data; on miss, call and store result.
**kwargs are forwarded to the wrapped data function's call
so that auto-provided arguments (e.g. InvocationContext) reach
the underlying function. They are intentionally excluded from the
cache key — such arguments are deterministic per row and pod, so the
same input data always produces the same output.
Raises:
InputValidationError: Ifdatais of another data context than this function's; the wrapped function has not been called then, whateverskip_cache_lookupandskip_cache_insertare.
async_call
Section titled “async_call”method · orcapod.core.data_function.CachedDataFunction.async_call
async def async_call( data: DataProtocol, *, logger: DataExecutionLoggerProtocol | None = None, skip_cache_lookup: bool = False, skip_cache_insert: bool = False, **kwargs: Any,) -> DataProtocol | NoneAsync counterpart of call with cache check and recording.
Raises:
InputValidationError: Ifdatais of another data context than this function's; the wrapped function has not been called then.
get_cached_output_for_data
Section titled “get_cached_output_for_data”method · orcapod.core.data_function.CachedDataFunction.get_cached_output_for_data
def get_cached_output_for_data(input_data: DataProtocol) -> DataProtocol | NoneRetrieve the cached output data for input_data.
If multiple cached entries exist, the most recent (by timestamp) wins.
Returns:
DataProtocol | None: The cached output data, orNoneif no entry was found.
record_data
Section titled “record_data”method · orcapod.core.data_function.CachedDataFunction.record_data
def record_data( input_data: DataProtocol, output_data: DataProtocol, skip_duplicates: bool = False,) -> DataProtocolRecord the output data against the input data in the result store.
get_all_cached_outputs
Section titled “get_all_cached_outputs”method · orcapod.core.data_function.CachedDataFunction.get_all_cached_outputs
def get_all_cached_outputs(include_system_columns: bool = False) -> 'pa.Table | None'Return all cached records from the result database for this function.
Parameters:
- include_system_columns (
bool) defaultFalse: If True, include system columns (e.g. record_id) in the result.
Returns:
'pa.Table | None': A PyArrow table of cached results, orNoneif empty.
DataFunctionBase
Section titled “DataFunctionBase”class · orcapod.core.data_function.DataFunctionBase
class DataFunctionBase( version: str = 'v0.0', label: str | None = None, data_context: str | DataContext | None = None, config: OrcapodConfig | None = None, executor: DataFunctionExecutorProtocol | None = None,)Bases: TraceableBase, Generic[E]
Abstract base class for DataFunctionProtocol.
Type-parameterized with the executor protocol E. Concrete
subclasses that bind E (e.g. class Foo(DataFunctionBase[SomeProto]))
get automatic isinstance validation in set_executor at class
definition time via __init_subclass__.
computed_label
Section titled “computed_label”method · orcapod.core.data_function.DataFunctionBase.computed_label
def computed_label() -> str | NoneReturn the canonical function name as the label if no explicit label is given.
output_data_schema_hash
Section titled “output_data_schema_hash”property · orcapod.core.data_function.DataFunctionBase.output_data_schema_hash
Type: str
Return the hash of the output data schema as a bare hex digest.
The digest is part of the function uri and so of table paths and source-info
tokens: a hash inside a name carries no label. It is computed lazily on first
access and cached for subsequent calls.
Returns:
str: The hex digest of the output data schema hash, without a label.
data_function_type_id
Section titled “data_function_type_id”property · orcapod.core.data_function.DataFunctionBase.data_function_type_id
Type: str
Unique function type identifier (e.g. "python.function.v1").
canonical_function_name
Section titled “canonical_function_name”property · orcapod.core.data_function.DataFunctionBase.canonical_function_name
Type: str
Human-readable function identifier.
input_data_schema
Section titled “input_data_schema”property · orcapod.core.data_function.DataFunctionBase.input_data_schema
Type: Schema
Schema describing the input data this function accepts.
accepts_arbitrary_keywords
Section titled “accepts_arbitrary_keywords”property · orcapod.core.data_function.DataFunctionBase.accepts_arbitrary_keywords
Type: bool
Whether the function takes input columns beyond input_data_schema.
False for every data function kind today: the parameters are a fixed
set (PythonDataFunction rejects **kwargs). A kind that passes every
input column to its function overrides this to return True; a function
pod then never drops a column for it (ITL-807).
output_data_schema
Section titled “output_data_schema”property · orcapod.core.data_function.DataFunctionBase.output_data_schema
Type: Schema
Schema describing the output data this function produces.
get_function_variation_data
Section titled “get_function_variation_data”method · orcapod.core.data_function.DataFunctionBase.get_function_variation_data
def get_function_variation_data() -> dict[str, Any]Raw data defining function variation
get_execution_data
Section titled “get_execution_data”method · orcapod.core.data_function.DataFunctionBase.get_execution_data
def get_execution_data() -> dict[str, Any]Raw data defining execution context
get_function_variation_data_schema
Section titled “get_function_variation_data_schema”method · orcapod.core.data_function.DataFunctionBase.get_function_variation_data_schema
def get_function_variation_data_schema() -> SchemaSchema for the data returned by get_function_variation_data.
get_execution_data_schema
Section titled “get_execution_data_schema”method · orcapod.core.data_function.DataFunctionBase.get_execution_data_schema
def get_execution_data_schema() -> SchemaSchema for the data returned by get_execution_data.
executor
Section titled “executor”property · orcapod.core.data_function.DataFunctionBase.executor
Type: E | None
Return the executor used to run this data function, or None for direct execution.
set_executor
Section titled “set_executor”method · orcapod.core.data_function.DataFunctionBase.set_executor
def set_executor(executor: DataFunctionExecutorProtocol | None) -> NoneSet or clear the executor, validating type compatibility.
Performs two checks:
- The executor supports this function's
data_function_type_id. - If the subclass bound
EviaGeneric[E], the executor is an instance of the resolved protocol (checked once at assignment time, not in the hot path).
Raises:
TypeError: If executor fails either compatibility check.
method · orcapod.core.data_function.DataFunctionBase.call
def call( data: DataProtocol, *, logger: DataExecutionLoggerProtocol | None = None, **kwargs: Any,) -> DataProtocol | NoneProcess a single data.
Base implementation calls direct_call. Subclasses that support
executors (e.g. PythonDataFunction) override to route through
the executor's execute_callable.
**kwargs are forwarded to direct_call and merged into the
function call dict alongside the data fields. Callers (e.g. a pod)
use this to supply auto-provided arguments such as an
InvocationContext that are not part of the data schema.
async_call
Section titled “async_call”method · orcapod.core.data_function.DataFunctionBase.async_call
async def async_call( data: DataProtocol, *, logger: DataExecutionLoggerProtocol | None = None, **kwargs: Any,) -> DataProtocol | NoneAsynchronously process a single data.
Base implementation calls direct_async_call. Subclasses that
support executors override to route through the executor.
**kwargs are forwarded to direct_async_call and merged into
the function call dict alongside the data fields.
direct_call
Section titled “direct_call”method · orcapod.core.data_function.DataFunctionBase.direct_call
def direct_call(data: DataProtocol, **kwargs: Any) -> DataProtocol | NoneExecute the function's native computation on data.
This is the method executors invoke. It bypasses executor routing and runs the computation directly. On user-function failure the exception is re-raised. Subclasses must implement this.
**kwargs are merged with data.as_dict() before the underlying
callable is invoked.
direct_async_call
Section titled “direct_async_call”method · orcapod.core.data_function.DataFunctionBase.direct_async_call
async def direct_async_call(data: DataProtocol, **kwargs: Any) -> DataProtocol | NoneAsynchronous counterpart of direct_call.