Skip to content

Python SDK - Tracking Variables

Track variables

askanna.track_variable

from askanna import track_variable

track_variable(name, value, label)

Parameters

Name Type Required Description
name String Yes Name of the value you want to track
value
  • String
  • Integer
  • Float/numeric
  • Date
  • Time
  • Datetime (ISO8601)
  • Boolean
  • Tag
  • Dictionary
Yes Value you want to track. See the list of types for formats we support in AskAnna.
label
  • List
  • Dictionary
No Labels you want to add to the tracked variable. Labels can contain a name or a name & value.

Output

No output. Track variable will temporarely store tracked variables in a local JSON file. When you run the script locally without a run SUUID set, AskAnna will display the location of the local file.

askanna.track_variables

from askanna import track_variables

track_variables(variables, label)

Parameters

Name Type Required Description
variables Dictionary Yes Dictionary with variables (name & values) you want to store. See track_variable for value types that we support.
label
  • List
  • Dictionary
No Labels you want to add to the tracked variables. Labels can contain a name or a name & value.

Output

No output. Track variable will temporarely store variables in a local JSON file. When you run the script locally without a run SUUID set, AskAnna will display the location of the local file.