core.skeleton.relskel ===================== .. py:module:: core.skeleton.relskel Classes ------- .. autoapisummary:: core.skeleton.relskel.RelSkel core.skeleton.relskel.RefSkel Module Contents --------------- .. py:class:: RelSkel Bases: :py:obj:`core.skeleton.meta.BaseSkeleton` This is a Skeleton-like class that acts as a container for Skeletons used as a additional information data skeleton for :class:`~viur.core.bones.relational.RelationalBone`. It needs to be sub-classed where information about the kindName and its attributes (bones) are specified. The Skeleton stores its bones in an :class:`OrderedDict`-Instance, so the definition order of the contained bones remains constant. .. py:method:: serialize(parentIndexed) .. py:method:: unserialize(values) Loads 'values' into this skeleton. :param values: dict with values we'll assign to our bones .. py:class:: RefSkel Bases: :py:obj:`RelSkel` This is a Skeleton-like class that acts as a container for Skeletons used as a additional information data skeleton for :class:`~viur.core.bones.relational.RelationalBone`. It needs to be sub-classed where information about the kindName and its attributes (bones) are specified. The Skeleton stores its bones in an :class:`OrderedDict`-Instance, so the definition order of the contained bones remains constant. .. py:method:: fromSkel(kindName, *args) :classmethod: Creates a ``RefSkel`` from a skeleton-class using only the bones explicitly named in ``args``. :param args: List of bone names we'll adapt :return: A new instance of RefSkel .. py:method:: read(key = None, *, subskel = (), bones = ()) Read full skeleton instance referenced by the RefSkel from the database. Can be used for reading the full Skeleton from a RefSkel. The `key` parameter also allows to read another, given key from the related kind. :param key: Can be used to overwrite the key; Ohterwise, the RefSkel's key-property will be used. :param subskel: Optionally form skel from subskels :param bones: Optionally create skeleton only from the specified bones :raise ValueError: If the entry is no longer in the database.