Skip to content

AsyncRepositoryClient

Class: warmhub.AsyncRepositoryClient

AsyncRepositoryClient(caller: AsyncCaller, locator: str)

A repository-bound view of the client’s namespaces.

:

sensors = client.repository("acme/sensors")
info = await sensors.get()
page = await sensors.things.head(shape="Reading", limit=5)

get(*, extra_headers: Omittable[ExtraHeaders] = UNSET, extra_query: Omittable[ExtraQuery] = UNSET, extra_body: Omittable[ExtraBody] = UNSET)

This repository’s metadata. Shorthand for .repo.get().

batch(*, message: Omittable[str] = UNSET, committer: Omittable[str] = UNSET, component_ref: Omittable[str] = UNSET, chunk_size: Omittable[int] = UNSET, stream_id: Omittable[str] = UNSET, submission_id: Omittable[str] = UNSET, skip_existing: Omittable[bool] = UNSET, retry: Omittable[RetryPolicy | bool] = UNSET, shapes: Mapping[str, ShapeFields] | None = None)

An operation builder bound to this repository.

Nothing is sent until await batch.commit(). Pass shapes to validate matching add/revise data locally before submission.

apply(message: str, operations: Sequence[Operation | Mapping[str, JsonValue]], *, committer: Omittable[str] = UNSET, component_ref: Omittable[str] = UNSET, chunk_size: Omittable[int] = UNSET, stream_id: Omittable[str] = UNSET, submission_id: Omittable[str] = UNSET, skip_existing: Omittable[bool] = UNSET, retry: Omittable[RetryPolicy | bool] = UNSET, shapes: Mapping[str, ShapeFields] | None = None, extra_headers: Omittable[Mapping[str, str]] = UNSET, extra_query: Omittable[Mapping[str, str]] = UNSET)

Submit operations as one commit. The one-shot form of batch.

Pass shapes to validate matching add/revise data before write admission or stream I/O. Without declarations, object data remains backend-authoritative so declared wref values are not guessed to be content.

validate(operations: Sequence[Operation | Mapping[str, JsonValue]], *, message: Omittable[str] = UNSET, committer: Omittable[str] = UNSET, component_ref: Omittable[str] = UNSET, skip_existing: Omittable[bool] = UNSET, include_would_be_body: Omittable[bool] = UNSET, extra_headers: Omittable[ExtraHeaders] = UNSET, extra_query: Omittable[ExtraQuery] = UNSET, extra_body: Omittable[ExtraBody] = UNSET)

Evaluate operations without persisting repository state.

org_name

Documentation is not yet available.

name

The repository name. name, not repo_name, to match name.

locator

Documentation is not yet available.

things

The thing namespace, bound to this repository.

repo

The repo namespace, bound to this repository.