Package dimer :: Module archive
[hide private]
[frames] | no frames]

Module archive

source code

utilities and wrappers for working with HDF archives.

* an archive contains one of more datasets

* a dataset contains

a dataset specification (dset_path) is the concatenation (`:` is used as a separator) of the path to the HDF file and the dataset name. All datasets hang on the root.

Functions [hide private]
 
__parse(path, PATT=re.compile(r'(.+\.h5):(.+)')) source code
 
basename(path)
a dataset has the form <archname>:<basename>
source code
 
archname(path)
a dataset has the form <archname>:<basename>
source code
 
split(path)
a dataset has the form <archname>:<basename>
source code
 
join(path, dsname)
join archname with basename
source code
 
save_object(file_path, key, obj)
atomic save operation
source code
 
load_object(file_path, key)
atomic load operation
source code
 
dset_path(path)
a checker for correct specification of an archive path
source code
Variables [hide private]
  log = logging.getLogger(__name__)
  __HDF_SUFFIX__ = 'h5'
  __SPEC_SEP__ = ':'
  DSPEC_MSG = 'dataset specification; of the form <hdf_archive_p...
  __package__ = 'dimer'
Function Details [hide private]

basename(path)

source code 

a dataset has the form <archname>:<basename>

Returns:
the archive (inside the file) part of the path

archname(path)

source code 

a dataset has the form <archname>:<basename>

Returns:
the archname part of the path

split(path)

source code 

a dataset has the form <archname>:<basename>

Returns:
(archname, basename)

Variables Details [hide private]

DSPEC_MSG

Value:
'dataset specification; of the form <hdf_archive_path>:<dataset_name>'