I need to make dictionary available as context var. I was trying to use @property setter, but don't understand how to correctly set key/value in this case.
I have websockets server and i need to make dictionary variable be unique for each client. Of course i can use get and set methods of contextvar each time i need to change dict i.e.
d = dict_var.get()
d['key']='val'
dict_var.set(d)
but it looks like a not good way
So, i'm trying to find proper way on how to use contextvar with dict, or how to make dict unique for asyncio task context (websockets server is async)