tiqi-group / pydase

A flexible and robust Python library for creating, managing, and interacting with data services, with built-in support for web and RPC servers, and customizable features for diverse use cases.
MIT License
0 stars 1 forks source link

Move @frontend decorator functionality into web settings #114

Open mosmuell opened 3 months ago

mosmuell commented 3 months ago

Is your feature request related to a problem? Please describe. The frontend decorator can be used to expose methods to the frontend explicitly. While this works fine, the web_settings.json was created to handle situations like this. I would like to have a separation of the backend code to the frontend configuration.

Describe the solution you'd like The MR #113 implements a "display" key-value pair in the web settings file. This could be used to tell the frontend which function it should render. It is still unclear how to handle functions with argument though - rendering them is not an option, but I need to tell the user that the frontend cannot display this. The frontend should probably show some error message telling the user to remove the "display: true" from the web_settings.json if it was added explicitly.

Describe alternatives you've considered Don't show an error message, just don't render functions with arguments. But users might be confused about this..