def skypipe_input_stream(endpoint, name=None):
name = name or '<STR_LIT>'<EOL>class context_manager(object):<EOL><INDENT>def __enter__(self):<EOL><INDENT>self.socket = ctx.socket(zmq.DEALER)<EOL>self.socket.connect(endpoint)<EOL>return self<EOL><DEDENT>def send(self, data):<EOL><INDENT>data_msg = sp_msg(SP_CMD_DATA, name, data)<EOL>self.socket.send_multipart(data_msg)<EOL><DEDENT>def __exit__(self, *args, **kwargs):<EOL><INDENT>eof_msg = sp_msg(SP_CMD_DATA, name, SP_DATA_EOF)<EOL>self.socket.send_multipart(eof_msg)<EOL>self.socket.close()<EOL><DEDENT><DEDENT>return context_manager()<EOL>
Returns a context manager for streaming data into skypipe