Schema Module¶
This module contains schema definitions and validation functionality.
schema
¶
Schema definitions for Nextpipe.
This module contains schema definitions used for pipeline configurations.
| CLASS | DESCRIPTION |
|---|---|
AppOption |
Option for running an app. |
AppRunConfig |
Configuration for running an app. |
AppOption
dataclass
¶
AppRunConfig
dataclass
¶
AppRunConfig(
input: dict[str, Any] | str | Any,
options: list[AppOption] | dict[str, Any] = list(),
name: str | None = None,
)
Configuration for running an app.
You can import the AppRunConfig class directly from nextpipe:
This class represents a configuration object used when running an app in a pipeline, containing input data, options, and an optional name.
| PARAMETER | DESCRIPTION |
|---|---|
|
Input data for the app. A JSON app can take a dictionary, multi-file apps can take a directory path as a string. Other types will be passed to the underlying Python SDK as-is (e.g., nextmv.Input).
TYPE:
|
|
Options for running the app, by default empty. These can be provided as a list of
TYPE:
|
|
Name for the run, by default None.
TYPE:
|
Examples:
>>> from nextpipe import AppRunConfig, AppOption
>>> config = AppRunConfig(
... input={"data": [1, 2, 3]},
... options={"threads": 4},
... name="my-run"
... )
get_options
¶
Get options as a dictionary.
This method converts the options attribute to a dictionary if it is provided
as a list of AppOption instances.
| RETURNS | DESCRIPTION |
|---|---|
dict[str, Any]
|
Dictionary of options. |
Source code in nextpipe/schema.py
input
instance-attribute
¶
Input for the app. A JSON app can take a dictionary, multi-file apps can take a directory path as a string. Other types will be passed to the underlying Python SDK as-is (e.g., nextmv.Input).