spaday_bridge ============= .. py:module:: spaday_bridge .. autoapi-nested-parse:: Real widget comm endpoints for the browser test, driven by JSON lines on stdin. ``python spaday_bridge.py [codec]`` serves one instrument widget, where ``widget`` names an entry of ``VIEWS``; ``python spaday_bridge.py session`` serves a :class:`nbplay.nbplay.Session` with one sequencer-and-synth track, exposing every widget by name. Requests carry an optional ``widget`` name; without one they address the only widget, or the session itself for ``command``. Attributes ---------- .. autoapisummary:: spaday_bridge.VIEWS spaday_bridge.name spaday_bridge.codec spaday_bridge.options spaday_bridge.session spaday_bridge.sent spaday_bridge.request Functions --------- .. autoapisummary:: spaday_bridge._jsonable spaday_bridge._describe spaday_bridge._state spaday_bridge.sync_all spaday_bridge.pick Module Contents --------------- .. py:data:: VIEWS .. py:function:: _jsonable(value) Replace bytes with their length, recursively, so the state fits a JSON line. .. py:function:: _describe(widget) .. py:function:: _state(widget) .. py:data:: name .. py:data:: codec .. py:data:: options .. py:data:: session .. py:data:: sent :value: [] .. py:function:: sync_all() .. py:function:: pick(request) .. py:data:: request