The Virtual Brain Project

Table Of Contents

Previous topic

transient Package

Next topic

neotraits Package

This Page

neocom Package


class tvb.core.neocom._h5loader.DirLoader(base_dir, registry, recursive=False)[source]

Bases: builtins.object

A simple recursive loader. Stores all files in a directory. You refer to files by their gid

path_for(h5_file_class, gid)[source]

where will this Loader expect to find a file of this format and with this gid

path_for_has_traits(has_traits_class, gid)[source]
class tvb.core.neocom._h5loader.Loader(registry)[source]

Bases: builtins.object

A default simple loader. Does not do recursive loads. Loads stores just to paths.

store(datatype, destination)[source]
class tvb.core.neocom._h5loader.TVBLoader(registry)[source]

Bases: builtins.object

load_from_index(dt_index, dt_class=None)[source]
path_for(operation_dir, h5_file_class, gid)[source]

Given a Datatype(HasTraitsIndex) instance, build where the corresponding H5 should be or is stored


class tvb.core.neocom._registry.Registry[source]

Bases: builtins.object

A configuration class that holds the one to one relationship between datatypes and H5Files that can read/write them to disk

register_datatype(datatype_class, h5file_class, datatype_index)[source]



Load a datatype stored in the tvb h5 file found at the given path

tvb.core.neocom.h5.load_from_dir(base_dir, gid, recursive=False)[source]

Loads a datatype with the requested gid from the given directory. The datatype should have been written with store_to_dir The name and location of the file is chosen for you. :param base_dir: The h5 storage directory :param gid: the gid of the to be loaded datatype :param recursive: if datatypes contained in this datatype should be loaded as well

tvb.core.neocom.h5.load_from_index(dt_index, dt_class=None)[source]

Load a datatype stored in the tvb h5 file found at the given path, but also load linked entities through GID

tvb.core.neocom.h5.path_for(base_dir, h5_file_class, gid)[source]
tvb.core.neocom.h5.path_for_stored_index(dt_index_instance)[source], destination)[source]

Stores the given datatype in a tvb h5 file at the given path

tvb.core.neocom.h5.store_complete(datatype, base_dir)[source]

Stores the given HasTraits instance in a h5 file, and fill the Index entity for later storage in DB

tvb.core.neocom.h5.store_to_dir(base_dir, datatype, recursive=False)[source]

Stores the given datatype in the given directory. The name and location of the stored file(s) is chosen for you by this function. If recursive is true than datatypes referenced by this one are stored as well.