def stream_response(self):
        """Stream data from the websocket.

        Streaming stops until the websocket is closed or
        the `end` event is received.
        """
        if self.websocket:
            while True:
                response = self.receive(mode=DataMode.JSON)
                if response["event"] == "end":
                    break
                yield response
Stream data from the websocket.

        Streaming stops until the websocket is closed or
        the `end` event is received.
        
lanarky/clients.py