SmartJob inputs
You can use these classes to defines inputs for your jobs.
SmartJob base input class
smartjob.Input
dataclass
Abstract base class for inputs. Do not use directly.
Source code in smartjob/app/input.py
filename: str
instance-attribute
File name to be used in the input path (without /).
SmartJob JSON input class
smartjob.JsonInput
dataclass
Bases: Input
Represents an input given as a JSON-serializable object.
Source code in smartjob/app/input.py
content: typing.Any
instance-attribute
Content to be seriliazed to JSON and written to the input path.
SmartJob bytes input class
smartjob.BytesInput
dataclass
Bases: Input
Represents an input given as bytes or str.
Source code in smartjob/app/input.py
content: bytes | str
instance-attribute
Content to be written to the input path (can be bytes or string).
SmartJob local path input class
smartjob.LocalPathInput
dataclass
Bases: Input
Represents an input given as a local file path.
Source code in smartjob/app/input.py
local_path: str
instance-attribute
Local path to the file to be copied to the input path.
SmartJob GCS input class
smartjob.GcsInput
dataclass
Bases: Input
Can be used to copy a file from a GCS bucket to the input path.
Source code in smartjob/app/input.py
gcs_path: str
instance-attribute
GCS path to the file to be copied (e.g. gs://my-bucket/my-file.txt).