hierarkey/models.py
def add_type(self, type: type, serialize: Callable[[Any], str], unserialize: Callable[[str], Any]) -> None:
        """
        Adds serialization support for a new type.

        :param type: The type to add support for.
        :param serialize: A callable that takes an object of type ``type`` and returns a string.
        :param unserialize: A callable that takes a string and returns an object of type ``type``.
        """
        self.types.append(HierarkeyType(type=type, serialize=serialize, unserialize=unserialize))

        Adds serialization support for a new type.

        :param type: The type to add support for.
        :param serialize: A callable that takes an object of type ``type`` and returns a string.
        :param unserialize: A callable that takes a string and returns an object of type ``type``.
        
Adds serialization support for a new type.
Adds serialization support for a new type .
def add_type(self, type: type, serialize: Callable[[Any], str], unserialize: Callable[[str], Any]) -> None:
        self.types.append(HierarkeyType(type=type, serialize=serialize, unserialize=unserialize))
def add_type ( self , type : type , serialize : Callable [ [ Any ] , str ] , unserialize : Callable [ [ str ] , Any ] ) -> None : self . types . append ( HierarkeyType ( type = type , serialize = serialize , unserialize = unserialize ) )
Adds serialization support for a new type.
Adds serialization support for a new type .
"""
        Adds serialization support for a new type.

        :param type: The type to add support for.
        :param serialize: A callable that takes an object of type ``type`` and returns a string.
        :param unserialize: A callable that takes a string and returns an object of type ``type``.
        """
self
type
type
The type to add support for.
The type to add support for .
serialize
Callable[[Any], str]
A callable that takes an object of type ``type`` and returns a string.
A callable that takes an object of type ` ` type ` ` and returns a string .
unserialize
Callable[[str], Any]
A callable that takes a string and returns an object of type ``type``.
A callable that takes a string and returns an object of type ` ` type ` ` .