everest.representers.mapping

Mapping and mapping registry.

class everest.representers.mapping.Mapping(mapping_registry, mapped_class, data_element_class, configuration)[source]

Bases: object

Performs configurable resource <-> data element tree <-> representation mappings.

Property mapped_class:
 The resource class mapped by this mapping.
Property data_element_class:
 The data element class for this mapping
__init__(mapping_registry, mapped_class, data_element_class, configuration)[source]
Parameters:configuration – mapping configuration object.
__weakref__

list of weak references to the object (if defined)

configuration[source]

Returns this mapping’s configuration object.

get_attribute_map(mapped_class=None, key=None)[source]

Returns a map of all attributes of the given mapped class.

Parameters:key – tuple of attribute names specifying a path to a nested attribute in a resource tree. If this is not given, all attributes in this mapping will be returned.
class everest.representers.mapping.SimpleMappingRegistry[source]

Bases: everest.representers.mapping.MappingRegistry

Default implementation for a mapping registry using default data element and configuration classes.

collection_data_element_base_class

alias of SimpleCollectionDataElement

linked_data_element_base_class

alias of SimpleLinkedDataElement

member_data_element_base_class

alias of SimpleMemberDataElement

Project Versions

Previous topic

everest.representers.interfaces

Next topic

everest.representers.traversal

This Page