kkg-else42
kkg-else42
I want to make the de-serialization as generic as possible for various attrs classes (their instances are sent as JSON messages via MQTT). For this purpose, the respective type information...
To rebuild a type object one needs the class name (`my_type.__name__`) and the module name (`my_type.__module__`): `my_type: type = getattr(importlib.import_module(), )` At the moment I store these two values. I'm...
> Looks like you want the metadata to be a fully-qualified name for a class, and the structuring hook to import it. Yes, this is what I want.
Sorry for the delay... I don't know if it is a minimal one, but here is my example: ```python from datetime import datetime from typing import Any, Final, Type, TypeVar...
Hi Tin, Is there anything else I should add or is it just a busy schedule?
> > But since the simple dict objects can also contain attrs instances, it must be possible to call the structuring recursively again. > > This is going to be...
Greatly appreciated help at light speed! What would it look like if the thing is a bit more complex? E.g. multiple hook factories and separate helpers for the hooks instead...
Let's take this as a starting point: ```python from datetime import datetime from functools import singledispatch from types import UnionType from typing import Any, Final, get_origin, get_args import attrs from...
Hi Tin, Is there anything else I should add or is it just a busy schedule?