.. _jgdv.structs.dkey.processor: =========================== jgdv.structs.dkey.processor =========================== .. py:module:: jgdv.structs.dkey.processor Classes ------- .. autoapisummary:: jgdv.structs.dkey.processor.DKeyProcessor Module Contents =============== .. _jgdv.structs.dkey.processor.DKeyProcessor: .. py:class:: DKeyProcessor Bases: :py:obj:`jgdv._abstract.protocols.pre_processable.PreProcessor_p` The Metaclass for keys, which ensures that subclasses of DKeyBase are API.Key_p's, despite there not being an actual subclass relation between them. This allows DKeyBase to actually bottom out at str .. py:method:: consume_format_params(spec) -> return (remaining, wrap, direct) .. py:method:: extract_raw_keys(data, *, implicit=False) -> Calls the Python format string parser to extract keys and their formatting/conversion specs, then wraps them in jgdv.structs.dkey._util.parser.API.RawKey_d's for convenience if 'implicit' then will parse the entire string as {str} .. py:method:: inspect_raw(raw_keys, kdata) -> Take extracted keys of the text, and determine features of them. can return modified text, and a mark .. py:method:: post_process(obj, data = None) -> Build subkeys if necessary .. py:method:: pre_process(cls, input, *args, strict = False, **kwargs) -> Pre-process the Key text, Extracts subkeys, and refines the type of key to build .. py:method:: process(obj, *, data = None) -> The key constructed, build slices .. py:method:: register_convert_param(cls, convert) -> .. py:method:: select_ctor(cls, *, mark, force, insist) -> Select the appropriate key ctor, which can be forced if necessary, otherwise uses the mark and multi params .. py:method:: validate_init_kwargs(ctor, kwargs) -> returns any keys not expected by a dkey or dkey subclass .. py:attribute:: _expected_init_keys :type: ClassVar[list[str]] .. py:attribute:: convert_mapping :type: dict[str, jgdv.structs.dkey._interface.KeyMark] .. py:attribute:: expected_kwargs :type: Final[list[str]] .. py:attribute:: parser :type: ClassVar[jgdv.structs.dkey._util.parser.DKeyParser]