Skip to content

Remote

Reusable object-storage synchronization state.

A Remote is caller-owned and may be shared by several databases and snapshots. Closing a dependent owner never closes the remote, and the remote refuses to close while any open database or snapshot still borrows it.

Remote.from_directory(path: 'str | os.PathLike[str]', options: 'RemoteOptions | None' = None) -> 'Remote'

Section titled “Remote.from_directory(path: 'str | os.PathLike[str]', options: 'RemoteOptions | None' = None) -> 'Remote'”

Open a filesystem-backed remote rooted at path.

The directory is created on first use. Options default to the ordinary behavior (read_concurrency 32, no retention policy).

Remote.from_storage(storage: 'BucketStorage', options: 'RemoteOptions | None' = None) -> 'Remote'

Section titled “Remote.from_storage(storage: 'BucketStorage', options: 'RemoteOptions | None' = None) -> 'Remote'”

Wrap a caller-supplied bucket storage adapter as a remote.

storage must satisfy the potluckdb.integrator.BucketStorage protocol (for example the S3 adapter). The remote never closes the adapter’s underlying transport on behalf of the caller.

Return a typed RemoteStatus snapshot of remote-owned state only.

Close the remote. Idempotent. Refused, without changing any state, while an open database or snapshot still borrows this remote.