Module Contents



The RecordBone class is a specialized bone type used to store structured data. It inherits from

class core.bones.record.RecordBone(*, format=None, indexed=False, using=None, **kwargs)

Bases: viur.core.bones.base.BaseBone

The RecordBone class is a specialized bone type used to store structured data. It inherits from the BaseBone class. The RecordBone class is designed to store complex data structures, such as nested dictionaries or objects, by using a related skeleton class (the using parameter) to manage the internal structure of the data.

  • format (str) – Optional string parameter to specify the format of the record bone.

  • indexed (bool) – Optional boolean parameter to indicate if the record bone is indexed. Defaults to False.

  • using (viur.core.skeleton.RelSkel) – A class that inherits from ‘viur.core.skeleton.RelSkel’ to be used with the RecordBone.

  • kwargs – Additional keyword arguments to be passed to the BaseBone constructor.

Initializes a new Bone.

type = 'record'

Unserializes a single value, creating an instance of the ‘using’ class and unserializing the value into it.


val – The value to unserialize.


An instance of the ‘using’ class with the unserialized data.


AssertionError – If the unserialized value is not a dictionary.

singleValueSerialize(value, skel, name, parentIndexed)

Serializes a single value by calling the serialize method of the ‘using’ skeleton instance.

  • value – The value to be serialized, which should be an instance of the ‘using’ skeleton.

  • skel (SkeletonInstance) – The parent skeleton instance.

  • name (str) – The name of the bone.

  • parentIndexed (bool) – A boolean indicating if the parent bone is indexed.


The serialized value.


Determines if the current request should attempt to parse subfields received from the client. This should only be set to True if a list of dictionaries is expected to be transmitted.

Return type:


singleValueFromClient(value, skel, bone_name, client_data)

Load a single value from a client

  • value – The single value which should be loaded.

  • skel – The SkeletonInstance where the value should be loaded into.

  • bone_name – The bone name of this bone in the SkeletonInstance.

  • client_data – The data taken from the client, a dictionary with usually bone names as key


A tuple. If the value is valid, the first element is the parsed value and the second is None. If the value is invalid or not parseable, the first element is a empty value and the second a list of ReadFromClientError.

getSearchTags(skel, name)

Collects search tags from the ‘using’ skeleton instance for the given bone.

  • skel (viur.core.skeleton.SkeletonInstance) – The parent skeleton instance.

  • name (str) – The name of the bone.


A set of search tags generated from the ‘using’ skeleton instance.

Return type:


getSearchDocumentFields(valuesCache, name, prefix='')

Generates a list of search document fields for the given values cache, name, and optional prefix.

  • valuesCache (dict) – A dictionary containing the cached values.

  • name (str) – The name of the bone to process.

  • prefix (str) – An optional prefix to use for the search document fields, defaults to an empty string.


A list of search document fields.

Return type:


getReferencedBlobs(skel, name)

Retrieves a set of referenced blobs for the given skeleton instance and name.

  • skel (SkeletonInstance) – The skeleton instance to process.

  • name (str) – The name of the bone to process.


A set of referenced blobs.

Return type:


abstract getUniquePropertyIndexValues(valuesCache, name)

This method is intentionally not implemented as it’s not possible to determine how to derive a key from the related skeleton being used (i.e., which fields to include and how).

  • valuesCache (dict) –

  • name (str) –

Return type:



Describes the bone and its settings as an JSON-serializable dict. This function has to be implemented for subsequent, specialized bone types.

Return type: