def stream_skypipe_output(endpoint, name=None):
    """Generator for reading skypipe data"""
    name = name or ''
    socket = ctx.socket(zmq.DEALER)
    socket.connect(endpoint)
    try:
        socket.send_multipart(sp_msg(SP_CMD_LISTEN, name))

        while True:
            msg = socket.recv_multipart()
            try:
                data = parse_skypipe_data_stream(msg, name)
                if data:
                    yield data
            except EOFError:
                raise StopIteration()

    finally:
        socket.send_multipart(sp_msg(SP_CMD_UNLISTEN, name))
        socket.close()
Generator for reading skypipe data