sdk.decorators
datalayer
def datalayer(runtime_name: Union[Callable[..., Any], Optional[str]] = None,
inputs: Optional[list[str]] = None,
output: Optional[str] = None,
snapshot_name: Optional[str] = None) -> Any
'Decorator to execute a function in a Datalayer runtime.\n\nParameters\n----------\nruntime_name : str, optional\n The name of the runtime to use. If not provided, a default runtime will be used.\ninputs : list[str], optional\n A list of input variable names for the function.\noutput : str, optional\n The name of the output variable for the function\nsnapshot_name : str, optional\n The name of the runtime snapshot to use\n\nReturns\n-------\nCallable[..., Any]\n A decorator that wraps the function to be executed in a Datalayer runtime.\n\nExamples\n--------\n\n>>> from datalayer_core.sdk.decorators import datalayer\n>>> @datalayer\n... def example(x: float, y: float -> float:\n... return x + y\n\n>>> from datalayer_core.sdk.decorators import datalayer\n>>> @datalayer(runtime_name="example-runtime", inputs=["x", "y"], output="z")\n... def example(x: float, y: float) -> float:\n... return x + y')