objconfig.reader package

Submodules

objconfig.reader.ini module

This is a port of zend-config to Python

Some idioms of PHP are still employed, but where possible I have Pythonized it

Following is the header as given in zend-config:

/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/zf2 for the
 *            canonical source repository
 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc.
 *            (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */
class objconfig.reader.ini.Ini(nestSeparator=’.’)[source]

Bases: objconfig.reader.readerinterface.ReaderInterface

Following is the class documentation as given in zend-config:

/**
 * INI config reader.
 */
buildNestedSection(sections, value)[source]

Following is the header as given in zend-config:

/**
 * Process a nested section
 *
 * @param array $sections
 * @param mixed $value
 * @return array
 */
static configParserToDict(config)[source]

Transform a configparser object into a dictionary.

fromFile(filename)[source]

Following is the header as given in zend-config:

/**
 * fromFile(): defined by Reader interface.
 *
 * @see    ReaderInterface::fromFile()
 * @param  string $filename
 * @return array
 * @throws Exception\RuntimeException
 */
fromString(string)[source]

Following is the header as given in zend-config:

/**
 * fromString(): defined by Reader interface.
 *
 * @param  string $string
 * @return array|bool
 * @throws Exception\RuntimeException
 */
getNestSeparator()[source]

Following is the header as given in zend-config:

/**
 * Get nest separator.
 *
 * @return string
 */
nestSeparator = None

Following is the header as given in zend-config:

/**
 * Directory of the file to process.
 *
 * @var string
 */
process(data)[source]

Following is the header as given in zend-config:

/**
 * Process data from the parsed ini file.
 *
 * @param  array $data
 * @return array
 */
processKey(key, value, ret)[source]

Following is the header as given in zend-config:

/**
 * Process a key.
 *
 * @param  string $key
 * @param  string $value
 * @param  array  $config
 * @return array
 * @throws Exception\RuntimeException
 */
processSection(section)[source]

Following is the header as given in zend-config:

/**
 * Process a section.
 *
 * @param  array $section
 * @return array
 */
setNestSeparator(separator)[source]

Following is the header as given in zend-config:

/**
 * Set nest separator.
 *
 * @param  string $separator
 * @return self
 */

objconfig.reader.json module

This is a port of zend-config to Python

Some idioms of PHP are still employed, but where possible I have Pythonized it

Following is the header as given in zend-config:

/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/zf2 for the
 *            canonical source repository
 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc.
 *            (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */
class objconfig.reader.json.Json[source]

Bases: objconfig.reader.readerinterface.ReaderInterface

Following is the class documentation as given in zend-config:

/**
 * JSON config reader.
 */
fromFile(filename)[source]

Following is the header as given in zend-config:

/**
 * fromFile(): defined by Reader interface.
 *
 * @see    ReaderInterface::fromFile()
 * @param  string $filename
 * @return array
 * @throws Exception\RuntimeException
 */
fromString(string)[source]

Following is the header as given in zend-config:

/**
 * fromString(): defined by Reader interface.
 *
 * @param  string $string
 * @return array|bool
 * @throws Exception\RuntimeException
 */

objconfig.reader.readerinterface module

This is a port of zend-config to Python

Some idioms of PHP are still employed, but where possible I have Pythonized it

Following is the header as given in zend-config:

/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/zf2 for the
 *            canonical source repository
 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc.
 *            (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */
class objconfig.reader.readerinterface.ReaderInterface[source]

Bases: object

The following is an ‘interface’ (abstraction) to be implemented by all configuration readers

fromFile(filename)[source]

Initialize configuration object from file.

fromString(string)[source]

Initialize configuration object from a string.

objconfig.reader.xml module

This is a port of zend-config to Python

Some idioms of PHP are still employed, but where possible I have Pythonized it

Following is the header as given in zend-config:

/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/zf2 for the
 *            canonical source repository
 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc.
 *            (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */
class objconfig.reader.xml.Xml[source]

Bases: objconfig.reader.readerinterface.ReaderInterface

Following is the class documentation as given in zend-config:

/**
 * XML config reader.
 */
fromFile(filename)[source]

Following is the header as given in zend-config:

/**
 * fromFile(): defined by Reader interface.
 *
 * @see    ReaderInterface::fromFile()
 * @param  string $filename
 * @return array
 * @throws Exception\RuntimeException
 */
fromString(string)[source]

Following is the header as given in zend-config:

/**
 * fromString(): defined by Reader interface.
 *
 * @param  string $string
 * @return array|bool
 * @throws Exception\RuntimeException
 */
loader(href, parse, encoding=None)[source]

Load the XML file from a file location

Args:
href: absolute/relative location of the file parse: do we immediately parse the file encoding: useful if not parsing, decodes the file from this encoding
Returns:
The file decoded file data if not parsed, otherwise the the ElementTree.parsed() root
process(elem)[source]

Following is the header as given in zend-config:

/**
 * Process the next inner element.
 *
 * @return mixed
 */
root = None

Following is the header as given in zend-config:

/**
 * Directory of the JSON file
 *
 * @var string
 */

objconfig.reader.yaml module

This is a port of zend-config to Python

NOTE: This file requires PyYaml, which is recorded in the setup.py

Some idioms of PHP are still employed, but where possible I have Pythonized it

Following is the header as given in zend-config:

/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/zf2 for the
 *            canonical source repository
 * @copyright Copyright (c) 2005-2015 Zend Technologies USA Inc.
 *            (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */
class objconfig.reader.yaml.Yaml[source]

Bases: objconfig.reader.readerinterface.ReaderInterface

Following is the class documentation as given in zend-config:

/**
 * YAML config reader.
 */
fromFile(filename)[source]

Following is the header as given in zend-config:

/**
 * fromFile(): defined by Reader interface.
 *
 * @see    ReaderInterface::fromFile()
 * @param  string $filename
 * @return array
 * @throws Exception\RuntimeException
 */
fromString(string)[source]

Following is the header as given in zend-config:

/**
 * fromString(): defined by Reader interface.
 *
 * @param  string $string
 * @return array|bool
 * @throws Exception\RuntimeException
 */
process(array)[source]

Following is the header as given in zend-config:

/**
 * Process the array for @include
 *
 * @param  array $data
 * @return array
 * @throws Exception\RuntimeException
 */
safe = None

Following is the header as given in zend-config:

/**
 * Directory of the JSON file
 *
 * @var string
 */

Module contents