Skip to main content

Parameter

Parameter for application.

Attributes

AttributeTypeDescription
namestrName of parameter.
value`Optional[ParameterTypes_DelayedValue]` = None
typeOptional[Literal["string", "file", "directory", "app_endpoint"]] = NoneType of parameter. If None, the type will be inferred from the value.
env_varOptional[str] = NoneEnvironment name to set the value in the serving environment.
downloadbool = TrueWhen True, the parameter will be automatically downloaded. This only works if the value refers to a file/directory in a object store. i.e. s3://...
mountOptional[str] = NoneIf value is a directory, then the directory will be available at mount. If value is a file, then the file will be downloaded into the mount directory.
ignore_patternslist[str] = []If value is a directory, then this is a list of glob patterns to ignore.

Constructor

Signature

def Parameter(
name: str,
value: Optional[ParameterTypes | _DelayedValue] = None,
type: Optional[Literal['string', 'file', 'directory', 'app_endpoint']] = None,
env_var: Optional[str] = None,
download: bool = True,
mount: Optional[str] = None,
ignore_patterns: list[str] = field(default_factory=list)
) - > null

Parameters

NameTypeDescription
namestrName of parameter.
value`Optional[ParameterTypes_DelayedValue]` = None
typeOptional[Literal['string', 'file', 'directory', 'app_endpoint']] = NoneType of parameter. If None, the type will be inferred from the value.
env_varOptional[str] = NoneEnvironment name to set the value in the serving environment.
downloadbool = TrueWhen True, the parameter will be automatically downloaded if it refers to an object store path.
mountOptional[str] = NoneThe directory path where the file or directory should be mounted or downloaded.
ignore_patternslist[str] = field(default_factory=list)A list of glob patterns to ignore if the value is a directory.