Skip to content

Storage

Persistent key-value storage.

3 modules

ModuleDescription
Delete Stored ValueDelete a value from persistent key-value storage
Get Stored ValueRetrieve a value from persistent key-value storage
Store ValueStore a value in persistent key-value storage

Modules

Delete Stored Value

storage.delete

Delete a value from persistent key-value storage

Parameters:

NameTypeRequiredDefaultDescription
namespacestringYesdefaultStorage namespace
keystringYes-Storage namespace

Output:

FieldTypeDescription
okbooleanKey to delete
deletedbooleanWhether the operation succeeded
keystringWhether the operation succeeded

Example: Delete cached value

yaml
namespace: cache
key: api_response

Get Stored Value

storage.get

Retrieve a value from persistent key-value storage

Parameters:

NameTypeRequiredDefaultDescription
namespacestringYesdefaultStorage namespace (e.g., workflow name or project)
keystringYes-Storage namespace (e.g., workflow name or project)
defaultanyNo-Key to retrieve

Output:

FieldTypeDescription
okbooleanValue to return if key does not exist
foundbooleanWhether the operation succeeded
valueanyWhether the operation succeeded
keystringWhether the key was found (not expired)

Example: Get last BTC price

yaml
namespace: crypto-alerts
key: btc_last_price
default: 0

Example: Get workflow state

yaml
namespace: my-workflow
key: last_run_status

Store Value

storage.set

Store a value in persistent key-value storage

Parameters:

NameTypeRequiredDefaultDescription
namespacestringYesdefaultStorage namespace (e.g., workflow name or project)
keystringYes-Storage namespace (e.g., workflow name or project)
valueanyYes-Key to store value under
ttl_secondsnumberNo0Time to live in seconds (optional, 0 = no expiration)

Output:

FieldTypeDescription
okbooleanTime to live in seconds (optional, 0 = no expiration)
keystringWhether the operation succeeded
stored_atnumberWhether the operation succeeded
expires_atnumberThe key that was stored

Example: Store BTC price

yaml
namespace: crypto-alerts
key: btc_last_price
value: 42350.5

Example: Store with expiration

yaml
namespace: cache
key: api_response
value: {"data": "cached"}
ttl_seconds: 3600

Released under the Apache 2.0 License.