Is your feature request related to a problem? Please describe.
The current implementation of pydase utilizes a callback system that effectively monitors attributes of a class and its child classes. However, this approach faces limitations when dealing with dynamic class structures, such as adding attributes after instantiation or modifying collections like lists.
Describe the solution you'd like
I propose enhancing pydase with a more dynamic observer pattern that can handle changes in the class structure post-instantiation. Specifically, this would include:
Dynamic Attribute Handling: Implementing a system where adding new attributes to an object after its creation would automatically register these attributes with the observer system. This could be achieved by overriding the __setattr__ method.
Observable Collections: Creating custom collection classes (like ObservableList) that are aware of their content changes. These collections would notify observers on any modification, such as adding or removing elements.
Nested Object Observation: Extending the observer pattern to seamlessly handle nested objects. Changes in attributes of nested objects should also trigger notifications to observers.
This approach aims to provide a more flexible and robust solution, allowing pydase to be used in a wider range of scenarios, especially those requiring dynamic modifications to object structures.
Is your feature request related to a problem? Please describe. The current implementation of
pydase
utilizes a callback system that effectively monitors attributes of a class and its child classes. However, this approach faces limitations when dealing with dynamic class structures, such as adding attributes after instantiation or modifying collections like lists.Describe the solution you'd like I propose enhancing
pydase
with a more dynamic observer pattern that can handle changes in the class structure post-instantiation. Specifically, this would include:Dynamic Attribute Handling: Implementing a system where adding new attributes to an object after its creation would automatically register these attributes with the observer system. This could be achieved by overriding the
__setattr__
method.Observable Collections: Creating custom collection classes (like
ObservableList
) that are aware of their content changes. These collections would notify observers on any modification, such as adding or removing elements.Nested Object Observation: Extending the observer pattern to seamlessly handle nested objects. Changes in attributes of nested objects should also trigger notifications to observers.
This approach aims to provide a more flexible and robust solution, allowing
pydase
to be used in a wider range of scenarios, especially those requiring dynamic modifications to object structures.