salvus.flow.acta.memo.labels
salvus.flow.acta.memo.labels salvus flow acta memo labels Mutable labels for computation keys and artifact references.
Functions
load_by_label()
load_by_label()def load_by_label(
name: str | Label, store: ContentStoreBase, record_store: RecordStore
) -> Any: ...Load the single stored value named by a key or ref label.
Key labels require exactly one single-digest output. Ref labels identify
the artifact directly. This lookup does not execute tasks or use shared
publication bindings. Missing readers raise TypeError; storage and
decoding errors propagate.
Parameters
namestr | Label — Exact label name, or a label whose current target must still match. Only key and ref are compared, not creation time. This check does not lock the label throughout loading.storeContentStoreBase — Content store holding the artifact and its payload.record_storeRecordStore — Record store containing the label and any record.
Returns Any — The deserialized Python value.
validate_label_name()
validate_label_name()def validate_label_name(name: str) -> str: ...Validate and return a label name.
Parameters
namestr — The candidate name.
Returns str — The same name, so this can be used inline at a call site.
Classes
Label
Labelclass Label(builtins.object):
def __init__(
self, name: str, key: str | None, ref: str | None, created_at: str
) -> None: ...A named computation key or artifact reference.
Parameters
namestr — The label name, unique within a record store.keystr | None — The envelope key this label names, orNonewhen it names bytes instead.refstr | None — The content digest this label names, orNonewhen it names a computation instead.created_atstr — Time the label was assigned to its current target.
Attributes
kind str
kind strReturn 'key' or 'ref', for display.
target str
target strReturn whichever of key/ref this label carries.
Raises: RuntimeError: If neither target is set.