Skip to content

repository

The synchronous repository handle.

:

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

Identical to AsyncRepositoryClient apart from the missing await, including the deliberate absence of watch documented in this module’s docstring. Sync owner: RepositoryClient. Async owner: AsyncRepositoryClient.

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) -> SubmitResult

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.

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) -> OperationBuilder

An operation builder bound to this repository.

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

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

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

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) -> CommitValidateResult

Evaluate operations without persisting repository state.

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) -> SubmitResult

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.

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) -> AsyncOperationBuilder

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.

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

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

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) -> CommitValidateResult

Evaluate operations without persisting repository state.