tiqi-group / pydase

A Python library for creating remote control interfaces of Python objects.
https://pydase.readthedocs.io
MIT License
1 stars 1 forks source link

Add support for dynamically adding attributes #96

Closed mosmuell closed 5 months ago

mosmuell commented 8 months ago

Is your feature request related to a problem? Please describe. Dynamically adding an attribute to the class instance is not being picked up by the observer.

class MyService(pydase.DataService):
    def some_function(self) -> None:
        self.added_attr = 10

Describe the solution you'd like Adapt the observer to update the cache when a new attribute is added. This might also involve updating how the frontend handles full access paths that are not yet registered.

Describe alternatives you've considered Just keep it like that.