Item definitions: what key/value pairs to expect

lizard_structure.items provides item definitions. An item definition is a formal specification of what kinds of key/value pairs you can expect in a JSON object (or Python dictionary) for such diverse items such as a layer, a menu item, a feature, a data source.

Technically, an item definition is nothing but a Python class that returns a dictionary. It is implemented as a class for the following reasons:

  • To make sure you comply to the specification. No undefined keys, no missing mandatory keys.
  • To allow for default values.
  • To make sure we can generate always-correct always-up-to-date documentation.

Layer tree

class lizard_structure.items.LayerTreeItem(**kwargs)[source]

Item definition for layertrees

Available values

url
Optional. (Default value: None).
name
Name of the item (Default value: None).
description
Description of the item, perhaps shown when hovering above it. HTML tags are allowed so you can add links or definition links.

(Default value: None).

Heading in a menu

class lizard_structure.items.HeadingItem(**kwargs)[source]

Wrapper/interface for heading objects in a LayerTree/menu.

Fixed values:

menu_type
(Fixed value: u’heading’)

Available values

klass
Optional. (Default value: None).
extra_data
Optional. (Default value: None).
heading_level
Optional. (Default value: 1).
name
Name of the item (Default value: None).
description
Description of the item, perhaps shown when hovering above it. HTML tags are allowed so you can add links or definition links.

(Default value: None).

Layer (workspace acceptable) in a menu

class lizard_structure.items.LayerItem(**kwargs)[source]

Wrapper/interface for layer/acceptable objects in a LayerTree/menu.

Fixed values:

menu_type
(Fixed value: u’workspace_acceptable’)

Available values

wms_params
Optional. (Default value: None).
wms_options
Optional. (Default value: None).
name
Name of the item (Default value: None).
wms_url
Optional. (Default value: None).
description
Description of the item, perhaps shown when hovering above it. HTML tags are allowed so you can add links or definition links.

(Default value: None).