Skip to content

Annotation

result(value, name, min=None, max=None, unit=None) ¶

result defines an input parameter of the script. It is used to create the profile for the code.

r1 = result(5*v1, name='res1') creates a result named 'res1' in the profile. If run with the python interpreter r1 is equal to 5*v1

Parameters:

Name Type Description Default
value supported_object_type

Value that is used if script is run with the python interpreter. Can be any expression.

required
name str

Name of the variable used by the API for job submission.

required
min

[optional] Minimum value that a numeric result takes. Currently not checked.

None
max

[optional] Maximum value that a numeric result takes. Currently not checked.

None
unit str

[optional] A string declaring the unit. This will likely change to support ´pynt` units. This is currently not checked and saved but will be used in the future.

None

Returns:

Type Description
supported_object_type

value

variable(value, name, min=None, max=None, unit=None) ¶

variable defines an input parameter of the script. It is used to create the profile for the code.

v1 = variable(5, name='var1') create a variable named 'var1' in the profile. If run with the python interpreter v1 takes the value 5 and can be used in the rest of the code just like any other variable.

Parameters:

Name Type Description Default
value supported_object_type

Value that is used if script is run with the python interpreter. Can be any expression.

required
name str

Name of the variable used by the API for job submission.

required
min

[optional] Minimum value that a numeric variable takes. Checked by API.

None
max

[optional] Maximum value that a numeric variable takes. Checked by API.

None
unit str

[optional] A string declaring the unit. This will likely change to support ´pynt` units.

None

Returns:

Type Description
supported_object_type

value