allensdk.config.model.formats package

Submodules

allensdk.config.model.formats.hdf5_util module

class allensdk.config.model.formats.hdf5_util.Hdf5Util[source]

Bases: object

read(file_path)[source]
write(file_path, m)[source]

allensdk.config.model.formats.json_description_parser module

class allensdk.config.model.formats.json_description_parser.JsonDescriptionParser[source]

Bases: allensdk.config.model.description_parser.DescriptionParser

log = <logging.Logger object>
read(file_path, description=None, section=None, **kwargs)[source]

Parse a complete or partial configuration.

Parameters:

json_string : string

Input to parse.

description : Description, optional

Where to put the parsed configuration. If None a new one is created.

section : string, optional

Where to put the parsed configuration within the description.

Returns:

Description

The input description with parsed configuration added.

Section is only specified for “bare” objects that are to be added to a section array.

read_string(json_string, description=None, section=None, **kwargs)[source]

Parse a complete or partial configuration.

Parameters:

json_string : string

Input to parse.

description : Description, optional

Where to put the parsed configuration. If None a new one is created.

section : string, optional

Where to put the parsed configuration within the description.

Returns:

Description

The input description with parsed configuration added.

Section is only specified for “bare” objects that are to be added to a section array.

write(filename, description)[source]

Write the description to a JSON file.

Parameters:

description : Description

Object to write.

write_string(description)[source]

Write the description to a JSON string.

Parameters:

description : Description

Object to write.

Returns:

string

JSON serialization of the input.

allensdk.config.model.formats.pycfg_description_parser module

class allensdk.config.model.formats.pycfg_description_parser.PycfgDescriptionParser[source]

Bases: allensdk.config.model.description_parser.DescriptionParser

log = <logging.Logger object>
read(pycfg_file_path, description=None, section=None, **kwargs)[source]

Read a serialized description from a Python (.pycfg) file.

Parameters:

filename : string

Name of the .pycfg file.

Returns:

Description

Configuration object.

read_string(python_string, description=None, section=None, **kwargs)[source]

Read a serialized description from a Python (.pycfg) string.

Parameters:

python_string : string

Python string with a serialized description.

Returns:

Description

Configuration object.

write(filename, description)[source]

Write the description to a Python (.pycfg) file.

Parameters:

filename : string

Name of the file to write.

write_string(description)[source]

Write the description to a pretty-printed Python string.

Parameters:

description : Description

Configuration object to write.

Module contents