zcollection.collection.Collection.from_config#

classmethod Collection.from_config(path, *, mode=None, filesystem=None, synchronizer=None)[source]#

Open a Collection described by a configuration file.

Parameters:
  • path (str) – The path to the configuration file.

  • mode (Literal['r', 'w'] | None) – The mode of the collection. This can be either ‘r’ (read-only) or ‘w’ (write).

  • filesystem (AbstractFileSystem | str | None) – The filesystem to use for the collection. This is an instance of a subclass of fsspec.AbstractFileSystem.

  • synchronizer (Sync | None) – The synchronizer to use for the collection. This is an instance of a subclass of zarr_synchronizer.Synchronizer.

Returns:

The collection.

Raises:

ValueError – If the provided directory does not contain a valid collection configuration file.

Return type:

Collection