formats

Concrete formats of Daf data sets.

class dafpy.formats. BaseDaf ( dset : DafReader , * , axes : Mapping [ str , str | Axis | LookupScalar | Names | QuerySequence | None ] | None = None , data : Mapping [ str | Tuple [ str , str ] | Tuple [ str , str , str ] | Tuple [ str , str , str , str ] , str | Axis | LookupScalar | Names | QuerySequence | None ] | None = None ) [source]

One base repository of a complete_chain , and the view parameters to apply to it. See the Julia documentation for details.

dafpy.formats. chain_reader ( dsets : Sequence [ DafReader ] , * , name : str | None = None ) DafReadOnly [source]

Create a read-only chain wrapper of DafReader , presenting them as a single DafReader . See the Julia documentation for details.

dafpy.formats. chain_writer ( dsets : Sequence [ DafReader ] , * , name : str | None = None ) DafWriter [source]

Create a chain wrapper for a chain of DafReader data, presenting them as a single DafWriter . See the Julia documentation for details.

dafpy.formats. complete_chain ( * , base_daf : DafReader | BaseDaf | Sequence [ DafReader | BaseDaf ] , new_daf : DafWriter , name : str | None = None , absolute : bool = False ) DafWriter [source]

Chain a freshly created empty new_daf on top of one or more base repositories, presenting them as a single DafWriter which complete_daf can reopen. See the Julia documentation for details.

dafpy.formats. complete_daf ( path : str , mode : str = 'r' , * , name : str | None = None ) DafReadOnly | DafWriter [source]

Open a complete chain of Daf repositories by tracing back through the base_daf_repository . See the Julia documentation for details.

dafpy.formats. files_daf ( path : str , mode : str = 'r' , * , name : str | None = None ) DafReadOnly | DafWriter [source]

A Daf storage format in disk files. See the Julia documentation for details.

dafpy.formats. files_to_zarr ( * , files_path : str , zarr_path : str ) None [source]

Hard-link convert a files_daf() directory at files_path into an equivalent zarr_daf() directory at zarr_path . The zarr_path must not already exist, its name must end with .daf.zarr , and the two paths must live on the same filesystem. See the Julia documentation for details.

dafpy.formats. h5df ( root : str | Julia: HDF5.File | Julia: HDF5.Group , mode : str = 'r' , * , name : str | None = None ) DafReadOnly | DafWriter [source]

A Daf storage format in an HDF5 disk file. See the Julia documentation for details.

Note that if you want to open the HDF5 file yourself (e.g., to access a specific group in it as a Daf data set), you will need to use the Julia API to do so, in order to pass the result here. That is, the current Python Daf API does not support using the Python HDF5 API. This is because the Daf Python API is just a thin wrapper for the Julia Daf implementation, which doesn’t “speak Python”.

dafpy.formats. http_daf ( url : str , * , name : str | None = None ) DafReadOnly [source]

Read-only access to a files_daf() served over http:// or https:// . See the Julia documentation for details.

dafpy.formats. memory_daf ( jl_obj : Julia: DataAxesFormats.MemoryFormat.MemoryDaf | None = None , * , name : str = 'memory' ) DafWriter [source]

Simple in-memory storage. See the Julia documentation for details.

dafpy.formats. open_daf ( path : str , mode : str = 'r' , * , name : str | None = None ) DafReadOnly | DafWriter [source]

Open a Daf data set, dispatching to the appropriate backend based on path . Zarr suffixes ( .daf.zarr , .daf.zarr.zip , .dafs.zarr.zip#/... ) open a zarr_daf() ; http:// or https:// URLs open a http_daf() (read-only); .h5df and .h5dfs# paths open an h5df() ; anything else opens a files_daf() . See the Julia documentation for details.

dafpy.formats. zarr_daf ( path : str , mode : str = 'r' , * , name : str | None = None ) DafReadOnly | DafWriter [source]

A Daf storage format in a Zarr directory tree, Zarr ZIP archive, or remote HTTP(S) Zarr group. The path follows one of these conventions: something.daf.zarr (directory), something.daf.zarr.zip (single-daf ZIP), something.dafs.zarr.zip#/group (sub-daf inside a multi-daf ZIP), or http(s)://... (remote zarr served over HTTP; read-only). See the Julia documentation for details.

dafpy.formats. zarr_to_files ( * , zarr_path : str , files_path : str ) None [source]

Hard-link convert a zarr_daf() directory at zarr_path into an equivalent files_daf() directory at files_path . The zarr_path must be a .daf.zarr directory (ZIP and HTTP Zarr backends are rejected); the files_path must not already exist, and the two paths must live on the same filesystem. See the Julia documentation for details.