prefect.variables
Classes
Variable
Variables are named, mutable JSON values that can be shared across tasks and flows.
Args:
name
: A string identifying the variable.value
: A string that is the value of the variable.tags
: An optional list of strings to associate with the variable.
aget
- name
: The name of the variable value to get.- default
: The default value to return if the variable does not exist.
aset
overwrite=True
Returns the newly set variable object.
Args:
- name
: The name of the variable to set.- value
: The value of the variable to set.- tags
: An optional list of strings to associate with the variable.- overwrite
: Whether to overwrite the variable if it already exists.
aunset
- name
: The name of the variable to unset.
True
if the variable was deleted, False
if the variable did not exist.
get
- name
: The name of the variable value to get.- default
: The default value to return if the variable does not exist.
set
overwrite=True
Returns the newly set variable object.
Args:
- name
: The name of the variable to set.- value
: The value of the variable to set.- tags
: An optional list of strings to associate with the variable.- overwrite
: Whether to overwrite the variable if it already exists.
unset
- name
: The name of the variable to unset.
True
if the variable was deleted, False
if the variable did not exist.