handler
with pd.inputs["data_store"]
.
set
method. The TTL value is specified in seconds:
set_ttl
method:
keys
method:
datastore.keys()
method does not return a list, but instead it returns a Keys
iterable object. You cannot export a data_store
or data_store.keys()
from a Python code step at this time.Instead, build a dictionary or list when using the data_store.keys()
method.key
exists in a data store, use if
and in
as a conditional:
data_store.get()
method to retrieve a specific key’s contents:
data_store["key"]
and data_store.get("key")
?data_store["key"]
will throw a TypeError
if the key doesn’t exist in the data store.data_store.get("key")
will instead return None
if the key doesn’t exist in the data store.data_store.get("key", "default_value")
will return "default_value"
if the key doesn’t exist on the data store.key
a new value or ''
to remove the value but retain the key.
name
attribute on the stored dictionary stored under the key pokemon
:
del
operation for a specific key
:
clear
method.
data_store.clear()
is an irreversible change, even when testing code in the workflow builder.