HomeGuidesAPI ReferenceChangelog
Log In
API Reference

Script

A piece of python code that can transform data, generate plots or train ML models.

Attributes

NameTypeDescription
script_iduuid.UUIDtechnical id of the script.
namestrunique name of the script function (unique key within its type).
descriptionstrhuman-readable description of what the script does.
script_typeScriptTypetype of script execution (api, raw, module, wizata).
versionstrversion string of the script.
librarystrkey of the ScriptLibrary this script belongs to (module type only).
modulestrPython import path for import_module() (module type only, e.g. 'my_lib.transforms').
functioncallablethe function as a callable object (not serialized).
sourcestrpython source code of the script (not serialized).

Methods

api_id()

Id of the script (script_id)

return: string formatted UUID of the script.

api_key()

return current object logical unique key (e.g. hardware_id, key, name).

returns None if the entity has no logical key.

copy()

Copy your function code and decorators to a format executable by the Wizata App.

NameTypeDefaultDescription
myfunctionyour function - pass the function itself as parameter

endpoint()

Name of the endpoints used to manipulate scripts.

return: Endpoint name.

from_json()

Load the Script entity from a dict.

Handles both new format and legacy backend format.

NameTypeDefaultDescription
objDict version of the Script.

load_function_from_dill()

Deserialize dill bytes into a Function object.

Handles both new format (Function only) and old format (entire Script).

NameTypeDefaultDescription
pkl_bytesraw dill-serialized bytes.
return: Function object (or whatever was stored if not a Script).

set_id()

specify the id_value neutrally

NameTypeDefaultDescription
id_value
return:

to_dict()

Serialize Script to a clean dict.

to_json()

Convert the script to a dictionary compatible to JSON format.

NameTypeDefaultDescription
targetstrNone