OperationBuilder
Class: warmhub.OperationBuilder
OperationBuilder(submit: SubmitCallable, *, options: CommitOptions | None = None, shapes: Mapping[str, ShapeFields] | None = None)Fluent builder for composing, validating, and submitting operations.
The blocking half of the pair. commit() returns a
SubmitResult — no await, and none accepted:
batch = repo.batch(message="seed")batch.add(name="Reading/probe-1", data={"temp_celsius": 21.0})result = batch.commit()The builder is not awaitable and has no build(). Finish a batch by
calling commit, which validates, submits, and seals it. Reusing a
sealed builder raises.
Methods
Section titled “Methods”add(*, name: str | Unset = UNSET, kind: CommitOperationKind | Unset = UNSET, about: str | Unset = UNSET, data: JsonValue | Unset = UNSET, type: str | Unset = UNSET, members: Sequence[str] | Unset = UNSET, affirmed_targets: Sequence[str] | Unset = UNSET, skip_existing: bool | Unset = UNSET)Queue an add. Returns self so calls chain.
revise
Section titled “revise”revise(*, name: str | Unset = UNSET, wref: str | Unset = UNSET, kind: CommitOperationKind | Unset = UNSET, data: JsonValue | Unset = UNSET, type: str | Unset = UNSET, members: Sequence[str] | Unset = UNSET, affirmed_targets: Sequence[str] | Unset = UNSET, expected_version: int | Unset = UNSET, lease_id: str | Unset = UNSET)Queue a revise. Returns self so calls chain.
retract
Section titled “retract”retract(name: str, *, kind: CommitOperationKind | Unset = UNSET, reason: str | Unset = UNSET, expected_version: int | Unset = UNSET, lease_id: str | Unset = UNSET)Queue a retract. Returns self so calls chain.
reaffirm
Section titled “reaffirm”reaffirm(name: str, *, kind: CommitOperationKind | Unset = UNSET, add: Sequence[str] | Unset = UNSET, remove: Sequence[str] | Unset = UNSET, expected_version: int | Unset = UNSET, lease_id: str | Unset = UNSET)Queue a reaffirm. Returns self so calls chain.
Edits which pinned target versions the assertion’s claim is affirmed
for, without changing claim data. add and remove compose in
one operation; already-present and already-absent targets are
reported as ignored rather than failing.
rename
Section titled “rename”rename(name: str, new_name: str, *, kind: CommitOperationKind | Unset = UNSET)Queue a rename. Returns self so calls chain.
has(name: str)Whether an add for name is already queued.
validate
Section titled “validate”validate()Run client-side validation without contacting the server.
commit
Section titled “commit”commit(*, extra_headers: Omittable[Mapping[str, str]] = UNSET, extra_query: Omittable[Mapping[str, str]] = UNSET)Validate, submit, and seal the builder.
extra_headers and extra_query apply to every chunk request. There
is no extra_body; see SubmitCallable.
Validation failures raise before any request is issued. Ambiguous
failures surface as PartialStreamSubmissionError; a deterministic
all-failed batch surfaces as AllStreamOperationsFailedError.
Properties and attributes
Section titled “Properties and attributes”operations
Section titled “operations”operationsThe queued operations, as an immutable snapshot.
sizeDocumentation is not yet available.
submitted
Section titled “submitted”submittedDocumentation is not yet available.