qcc_kplugin.server ================== .. py:module:: qcc_kplugin.server .. autoapi-nested-parse:: Command server on localhost:8083 so notebooks / ``qcc`` can ask the GUI for things klive cannot do. One JSON object per line, one JSON reply per request (same framing as klive on 8082): * ``{"cmd": "screenshot", "path": "...png", "width": 1600, "height": 1200, "box": [x0, y0, x1, y1]?, "layout": "...oas"?}`` — save the current view (or ``box``, µm) as PNG with the GUI's own layer colours; with ``layout`` that file is first opened (or reloaded if already open); ``lyp`` (layer properties file) and ``hide`` (layer-name fragments) restyle the view first → ``{"ok": true, "path": ...}`` * ``{"cmd": "status"}`` → ``{"ok": true, "design": ..., "layout": ..., "watching": bool, "klayout": version}`` * ``{"cmd": "open", "design": "path/design.json"}`` → open the design in the session (build + load) Attributes ---------- .. autoapisummary:: qcc_kplugin.server.PORT qcc_kplugin.server.SERVER Classes ------- .. autoapisummary:: qcc_kplugin.server.CommandServer Functions --------- .. autoapisummary:: qcc_kplugin.server.handle qcc_kplugin.server.start_server Module Contents --------------- .. py:class:: CommandServer(parent=None) Bases: :py:obj:`pya.QTcpServer` .. py:function:: handle(req: dict) -> dict .. py:function:: start_server() .. py:data:: PORT :value: 8083 .. py:data:: SERVER :value: []