API Reference

Public API

PyTensorStore.ContextWrapperType
ContextWrapper(parent::Py)

A wrapper around a Python tensorstore.Context object. Used for sharing resources (like cache pools) between multiple TensorStore handles.

source
PyTensorStore.FutureWrapperType
FutureWrapper{Result}(parent::Py)

A wrapper around a Python tensorstore.Future object. Result is the Julia type that the future will resolve to when .result() is called.

source
PyTensorStore.IndexDomainWrapperType
IndexDomainWrapper(parent::Py)

A wrapper around a Python tensorstore.IndexDomain object. Represents the coordinate system and labels of a TensorStore.

source
PyTensorStore.SchemaWrapperType
SchemaWrapper(parent::Py)

A wrapper around a Python tensorstore.Schema object. Describes the data type, domain, and layout of a TensorStore.

source
PyTensorStore.SpecWrapperType
SpecWrapper(parent::Py)

A wrapper around a Python tensorstore.Spec object. Represents a serializable specification of a TensorStore.

source
PyTensorStore.commit_asyncMethod
commit_async(txn::TransactionWrapper) -> FutureWrapper{ReturnsNothing}

Start committing the transaction asynchronously.

source
PyTensorStore.contextMethod
context(spec::Dict) -> ContextWrapper
context() -> ContextWrapper

Create a TensorStore context for shared resources like cache pools.

source
PyTensorStore.labelMethod
label(w::TensorStoreWrapper, labels...) -> TensorStoreWrapper

Assign new labels to the dimensions of the TensorStore.

source
PyTensorStore.labelsMethod
labels(w::IndexDomainWrapper) -> Vector{String}

Return the labels of the dimensions in the index domain.

source
PyTensorStore.openMethod
open(spec; kwargs...) -> FutureWrapper{TensorStoreWrapper}

Open a TensorStore from a configuration dictionary or Spec. Returns a FutureWrapper that resolves to a TensorStoreWrapper.

Common keyword arguments:

  • transaction: A TransactionWrapper to use for this open operation.
  • context: A ContextWrapper or dictionary for shared resources.
  • create: Boolean, whether to create the store if it doesn't exist.
  • open: Boolean, whether to open an existing store.
  • delete_existing: Boolean, whether to delete an existing store.
source
PyTensorStore.resultMethod
result(w::FutureWrapper{Result}) -> Result

Wait for the future to complete and return the result, converted to the Julia type Result.

source
PyTensorStore.transactionMethod
transaction(f::Function)

Run a function f(txn) within a transaction. The transaction is automatically committed if f returns normally, and aborted if an exception is thrown.

source
PyTensorStore.translate_byMethod
translate_by(w::TensorStoreWrapper, offsets...) -> TensorStoreWrapper

Shift the coordinate system of the TensorStore by the given relative offsets. Offsets are relative to the current coordinate system.

source
PyTensorStore.translate_toMethod
translate_to(w::TensorStoreWrapper, coords...) -> TensorStoreWrapper

Shift the coordinate system of the TensorStore so that its origin starts at the specified coordinates. Coordinates are 1-based Julia indices.

source

Python Module Wrapper