RemoteObject

RemoteObject is the public base class for blosc2.RemoteArray, blosc2.RemoteStore, and blosc2.RemoteCTable. It is useful for type checks; construct a concrete type or use blosc2.open() instead of constructing RemoteObject directly.

import blosc2

obj = blosc2.open("https://host/data.b2z")
assert isinstance(obj, blosc2.RemoteObject)

Remote objects expose a credential-free source, read-only attrs, source traffic, cache policy and accounting properties, an export-default mutable flag, and close() with context-manager support. Cache accounting has concrete-type scope: arrays report their own retained payload, while stores and tables report their shared owner’s retained payload.

RemoteObject is not a factory, storage backend, serialization format, or remote-write API. Data-specific operations remain on the concrete classes. Arrays and tables provide materialize(); stores provide recursive materialize() to expand their contents and mounted stores into a local tree.

See Working with Remote Data for the shared cache, traffic, reference-saving, and lifetime behavior.

class blosc2.RemoteObject[source]

Base class for remote arrays, stores, and tables.

Construct a concrete remote type or use blosc2.open(); this class is intended for type checks and the shared remote-object contract.

Attributes:
attrs

Read-only user metadata for the selected remote object.

cache_bytes

Compressed payload currently retained at this object’s scope.

cache_policy

Configured payload-retention policy.

is_cache_mutable

Whether the currently attached local cache is writable.

max_cache_bytes

Configured compressed-payload allowance.

mutable

Default mutability for future reference exports.

source

Credential-free descriptor for the selected remote object.

traffic

Source-read accounting for this object or its shared owner.

Methods

close()

Release resources owned by this handle.

save(destination, *[, include_cache, ...])

Write a portable remote reference and return its output path.

property attrs

Read-only user metadata for the selected remote object.

property cache_bytes

Compressed payload currently retained at this object’s scope.

property cache_policy

Configured payload-retention policy.

close() → None[source]

Release resources owned by this handle.

property is_cache_mutable: bool

Whether the currently attached local cache is writable.

property max_cache_bytes

Configured compressed-payload allowance.

property mutable: bool

Default mutability for future reference exports.

save(destination, *, include_cache: bool = True, mutable: bool | None = None, overwrite: bool = False) → str[source]

Write a portable remote reference and return its output path.

property source

Credential-free descriptor for the selected remote object.

property traffic

Source-read accounting for this object or its shared owner.