core.bones.address ================== .. py:module:: core.bones.address Attributes ---------- .. autoapisummary:: core.bones.address.CACHE_KIND Classes ------- .. autoapisummary:: core.bones.address.AddressRelSkel core.bones.address.AddressBone Module Contents --------------- .. py:data:: CACHE_KIND :value: 'viur-addressbone-geocache' .. py:class:: AddressRelSkel Bases: :py:obj:`core.skeleton.relskel.RelSkel` .. py:attribute:: street_name .. py:attribute:: street_number .. py:attribute:: address_addition .. py:attribute:: zip_code .. py:attribute:: city .. py:attribute:: country .. py:attribute:: coordinates .. py:class:: AddressBone(*, using = AddressRelSkel, format = '$(street_name) $(street_number), $(zip_code) $(city)', **kwargs) Bases: :py:obj:`core.bones.record.RecordBone` 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. :param format: Optional string parameter to specify the format of the record bone. :param indexed: Optional boolean parameter to indicate if the record bone is indexed. Defaults to False. :param using: A class that inherits from 'viur.core.skeleton.RelSkel' to be used with the RecordBone. :param kwargs: Additional keyword arguments to be passed to the BaseBone constructor. Initializes a new Bone. .. py:attribute:: type :value: 'record.address' .. py:method:: after_from_client(skel, name, errors) Called at the end of :meth:`fromClient` after ``skel[name]`` has been set and all validation (including multiple-constraints) has run. Override to post-process or normalize ``skel[name]`` in-place, or to add/remove entries from ``errors``. Always called when the field was part of the submitted data (i.e. ``skel[name]`` has been written), regardless of whether errors occurred. The ``NotSet`` early-return (field absent from request) is the only case where this hook is *not* called. :param skel: The skeleton instance whose bone value was just read. :param name: The attribute name of this bone within the skeleton. :param errors: Mutable list of :class:`ReadFromClientError` collected so far. Changes here affect the return value of :meth:`fromClient`. .. py:method:: _cache_key(params) :staticmethod: .. py:method:: geocode(skel) :staticmethod: