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

Feat: frontend display toggle #113

Closed mosmuell closed 3 months ago

mosmuell commented 3 months ago

This MR adds a key-value pair to the web settings that allows the user to specify that some component should not be rendered in the frontend.

Example:

import pydase
from pydase.utils.decorators import frontend

class MyService(pydase.DataService):
    @frontend
    def some_function(self) -> None:
        pass

    async def some_task(self) -> None:
        while True:
            # ...

with following web settings:

{
    "some_function": {
        "displayName": "hello",
        "display": true
    },
    "some_task": {
        "display": false
    }
}

looks like this image