yt.utilities.parameter_file_storage module

exception yt.utilities.parameter_file_storage.NoParameterShelf[source]

Bases: Exception

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

class yt.utilities.parameter_file_storage.ParameterFileStore(*p, **k)[source]

Bases: object

This class is designed to be a semi-persistent storage for parameter files. By identifying each dataset with a unique hash, objects can be stored independently of datasets – when an object is loaded, the dataset is as well, based on the hash. For storage concerns, only a few hundred will be retained in cache.

check_ds(ds)[source]

This will ensure that the dataset (ds) handed to it is recorded in the storage unit. In doing so, it will update path and “last_seen” information.

flush_db()[source]

This flushes the storage to disk.

get_ds_ctid(ctid)[source]

This returns a dataset based on a CurrentTimeIdentifier.

get_ds_hash(hash)[source]

This returns a dataset based on a hash.

get_recent(n=10)[source]
init_db()[source]

This function ensures that the storage database exists and can be used.

insert_ds(ds)[source]

This will insert a new ds and flush the database to disk.

read_db()[source]

This will read the storage device from disk.

wipe_hash(hash)[source]

This removes a hash corresponding to a dataset from the storage.

exception yt.utilities.parameter_file_storage.UnknownDatasetType(name)[source]

Bases: Exception

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.