core.skeleton.instance ====================== .. py:module:: core.skeleton.instance Classes ------- .. autoapisummary:: core.skeleton.instance.SkeletonInstance Module Contents --------------- .. py:class:: SkeletonInstance(skel_cls, entity = None, *, bones = (), bone_map = None, clone = False, clonedBoneMap = None) The actual wrapper around a Skeleton-Class. An object of this class is what's actually returned when you call a Skeleton-Class. With ViUR3, you don't get an instance of a Skeleton-Class any more - it's always this class. This is much faster as this is a small class. Creates a new SkeletonInstance based on `skel_cls`. :param skel_cls: Is the base skeleton class to inherit from and reference to. :param bones: If given, defines an iterable of bones that are take into the SkeletonInstance. The order of the bones defines the order in the SkeletonInstance. :param bone_map: A pre-defined bone map to use, or extend. :param clone: If set True, performs a cloning of the used bone map, to be entirely stand-alone. .. py:attribute:: __slots__ .. py:attribute:: _cascade_deletion :value: False .. py:attribute:: accessedValues .. py:attribute:: dbEntity :value: None .. py:attribute:: errors :value: [] .. py:attribute:: is_cloned :value: False .. py:attribute:: renderAccessedValues .. py:attribute:: renderPreparation :value: None .. py:attribute:: skeletonCls .. py:method:: items(yieldBoneValues = False) .. py:method:: keys() .. py:method:: values() .. py:method:: __iter__() .. py:method:: __contains__(item) .. py:method:: __bool__() .. py:method:: get(item, default=None) .. py:method:: update(*args, **kwargs) .. py:method:: __setitem__(key, value) .. py:method:: __getitem__(key) .. py:method:: __getattr__(item) Get a special attribute from the SkeletonInstance __getattr__ is called when an attribute access fails with an AttributeError. So we know that this is not a real attribute of the SkeletonInstance. But there are still a few special cases in which attributes are loaded from the skeleton class. .. py:method:: __delattr__(item) .. py:method:: __setattr__(key, value) .. py:method:: __repr__() .. py:method:: __str__() .. py:method:: __len__() .. py:method:: __ior__(other) .. py:method:: clone(*, apply_clone_strategy = False) Clones a SkeletonInstance into a modificable, stand-alone instance. This will also allow to modify the underlying data model. .. py:method:: ensure_is_cloned() Ensured this SkeletonInstance is a stand-alone clone, which can be modified. Does nothing in case it was already cloned before. .. py:method:: setEntity(entity) .. py:method:: structure() .. py:method:: dump() Return a simplified version of the bone values in this skeleton. This can be used for example in the JSON renderer. .. py:method:: __deepcopy__(memodict)