Skip to content

variable

Module to interact with Package Variables.

This module contains class to interact with Package Variables in Studio.

Typical usage example
variable = package.create_variable("DATA_MODEL_VARIABLE", "DATA_MODEL_ID", "DATA_MODEL")
variables = package.get_variables()

variable.delete()

Variable

Bases: VariableDefinitionWithValue

Variable object to interact with variable specific studio endpoints.

client class-attribute

client: Client = Field(Ellipsis, exclude=True)

key class-attribute

key: str

package_key class-attribute

package_key: str

from_transport classmethod

from_transport(client, package_key, variable_transport)

Creates high-level variable object from given VariableDefinitionWithValue.

Parameters:

  • client (Client) –

    Client to use to make API calls for given variable.

  • package_key (str) –

    Key of package where variable is located.

  • variable_transport (VariableDefinitionWithValue) –

    VariableDefinitionWithValue object containing properties of variable.

Returns:

  • Variable

    A Variable object with properties from transport and given client.

update

update()

Pushes local changes of variable to EMS and updates properties with response from EMS.

sync

sync()

Syncs variable properties with EMS.

Raises:

delete

delete()

Deletes variable.