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)Methods
Section titled “Methods”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
Section titled “validate”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.
Properties and attributes
Section titled “Properties and attributes”org_name
Section titled “org_name”org_nameDocumentation is not yet available.
nameThe repository name. name, not repo_name, to match
name.
locator
Section titled “locator”locatorDocumentation is not yet available.
things
Section titled “things”thingsThe thing namespace, bound to this repository.
repoThe repo namespace, bound to this repository.