Configurator Developer Manual

Contents:

class configuration.ConfigurationSchema(name='', **args)[source]

Configuration schemas define the configurations structure. They have a name, a list of parents, and a list of sections with options definitions.

Configuration schemas can be composed by inheriting from multiple parents. Configuration sections from the parents appear in the child configuration schema. For instance, a full stack web framework configuration schema could inherit from a generic Web schema for web server configuration, and another Database schema for database connection configuration.

Configuration schemas have sections, each containing other sections and schema options. The schemas sections and options can be manipulated in the tree appearing on the left of the configuration schemas navigator.

add_parent(parent)[source]

Adds parent to the list of schema’s parents

classmethod configuration_schemas()[source]

Return the list of globally registered configuration schemas

direct_sections()[source]

Return schema’s direct sections (without looking at schema’s parents sections)

documentation[source]

The schema’s documentation

classmethod get_named(name)[source]

Get the configuration schema registered with name name

get_section(name)[source]

Get section with name

move_section_backwards(section)[source]

Move section backwards. For moving sections from UI

move_section_forward(section)[source]

Move section forward (reorder). For moving sections from UI

name[source]

The schema’s name

parents()[source]

Returns the schema’s parents list

classmethod register_schema(schema)[source]

Register a schema, globally. This is called automatically when a configuration schema is created.

remove_section(section)[source]

Remove section from the schema

section(section)[source]

Add section section to schema

sections()[source]

Return schema’s sections recursively considering its parents

set_parents(parents)[source]

Sets the schema’s parents to parents list

classmethod unregister_schema(schema)[source]

Unregister a schema, globally.

class configuration.ConfigurationSchemaSection(name='', **args)[source]

Configuration schema section

add_option(option)[source]

Adds option option to the section

add_section(section)[source]

Adds section section as a subsection

dependency_expression[source]

The section’s dependency expression

documentation[source]

The section’s documentation

get_option(name)[source]

Gets section option with name name from the section. If it is not found, None is return

name[source]

Section name

options()[source]

Returns the section’s options list

parent[source]

The section’s parent. It can be the configuration schema if it is a top-level section, of the parent section if it is a subsection

remove_option(option)[source]

Removes option option from the section

remove_section(section)[source]

Removes the subsection section

subsections()[source]

Return the section’s subsections

Indices and tables

Table Of Contents

This Page