Parameter Types

class floe.api.parameters.BaseParameter(name: Optional[str] = None, title: Optional[str] = None, default=None, null: bool = False, help_text: str = '', promoted: bool = False, promoted_name: Optional[str] = None, required: bool = False, hidden: bool = False, value=None, static: bool = False, max_value=None, min_value=None, max_length=None, choices=None, level='basic', description: str = '', many: bool = False, order: Optional[int] = None)

Base parameter class.

classmethod from_json(spec: dict)floe.api.parameters.BaseParameter

Constructs and returns a new parameter instance from a JSON representation.

is_input()bool

Determines if input parameter based on the type_name suffix

is_output()bool

Determines if output parameter based on the type_name suffix

json()dict

Returns a parameter’s JSON representation.

validate(value)

Check that value is a valid value for the parameter. If value is None, validates the parameter’s default value. :param value: The value to be checked :raises: ValueError :return: None

class floe.api.parameters.BooleanParameter(*args, **kwargs)

True or False. The strings ‘1’ or ‘true’ are coerced to True, everything else is False.

class floe.api.parameters.DecimalParameter(name: Optional[str] = None, title: Optional[str] = None, default=None, null: bool = False, help_text: str = '', promoted: bool = False, promoted_name: Optional[str] = None, required: bool = False, hidden: bool = False, value=None, static: bool = False, max_value=None, min_value=None, max_length=None, choices=None, level='basic', description: str = '', many: bool = False, order: Optional[int] = None)

A floating point value optionally bounded by min_value or max_value.

validate(value)

Check that value is a valid value for the parameter. If value is None, validates the parameter’s default value. :param value: The value to be checked :raises: ValueError :return: None

class floe.api.parameters.FileInputParameter(name: Optional[str] = None, title: Optional[str] = None, default=None, null: bool = False, help_text: str = '', promoted: bool = False, promoted_name: Optional[str] = None, required: bool = False, hidden: bool = False, value=None, static: bool = False, max_value=None, min_value=None, max_length=None, choices=None, level='basic', description: str = '', many: bool = False, order: Optional[int] = None)

A string containing the name of a file to be used for input.

class floe.api.parameters.FileOutputParameter(name: Optional[str] = None, title: Optional[str] = None, default=None, null: bool = False, help_text: str = '', promoted: bool = False, promoted_name: Optional[str] = None, required: bool = False, hidden: bool = False, value=None, static: bool = False, max_value=None, min_value=None, max_length=None, choices=None, level='basic', description: str = '', many: bool = False, order: Optional[int] = None)

A string containing the name of a file to be used for output.

class floe.api.parameters.IntegerParameter(name: Optional[str] = None, title: Optional[str] = None, default=None, null: bool = False, help_text: str = '', promoted: bool = False, promoted_name: Optional[str] = None, required: bool = False, hidden: bool = False, value=None, static: bool = False, max_value=None, min_value=None, max_length=None, choices=None, level='basic', description: str = '', many: bool = False, order: Optional[int] = None)

An integer optionally bounded by min_value or max_value.

validate(value)

Check that value is a valid value for the parameter. If value is None, validates the parameter’s default value. :param value: The value to be checked :raises: ValueError :return: None

class floe.api.parameters.JSONParameter(name: Optional[str] = None, title: Optional[str] = None, default=None, null: bool = False, help_text: str = '', promoted: bool = False, promoted_name: Optional[str] = None, required: bool = False, hidden: bool = False, value=None, static: bool = False, max_value=None, min_value=None, max_length=None, choices=None, level='basic', description: str = '', many: bool = False, order: Optional[int] = None)

A JSON object map (i.e. dictionary). Strings are deserialized into JSON.

class floe.api.parameters.ParameterGroup(title: str, parameters: List[floe.api.parameters.BaseParameter], name: Optional[str] = None, description: str = '', order: Optional[int] = None, collapsed: bool = False)

A logical grouping of parameters that acts as a hint to a user interface.

json()dict

Converts a parameter group instance into its JSON representation.

replace_parameter(param: floe.api.parameters.BaseParameter, new_param: floe.api.parameters.BaseParameter)None

Replaces a parameter in a group with a new parameter.

class floe.api.parameters.PromotedParameterGroup(title: str, parameters: List[floe.api.parameters.BaseParameter], name: Optional[str] = None, description: str = '', order: Optional[int] = None, collapsed: bool = False)

A logical grouping of promoted parameters that acts as a hint to a user interface.

replace_parameter(param: floe.api.parameters.BaseParameter, new_param: floe.api.parameters.BaseParameter)None

This method is not supported for PromotedParameterGroup. Use my_floe.modify_parameter_group() instead.

class floe.api.parameters.StringParameter(name: Optional[str] = None, title: Optional[str] = None, default=None, null: bool = False, help_text: str = '', promoted: bool = False, promoted_name: Optional[str] = None, required: bool = False, hidden: bool = False, value=None, static: bool = False, max_value=None, min_value=None, max_length=None, choices=None, level='basic', description: str = '', many: bool = False, order: Optional[int] = None)

A string, optionally bound by max_length.

validate(value)

Check that value is a valid value for the parameter. If value is None, validates the parameter’s default value. :param value: The value to be checked :raises: ValueError :return: None