.. rubric:: :doc:`index` jsonrpcclient over ZeroMQ ************************* Send JSON-RPC requests over ZeroMQ. Installation ============ .. code-block:: sh $ pip install jsonrpcclient pyzmq Usage ===== Set the server details:: from jsonrpcclient.zmq_server import ZMQServer server = ZMQServer('tcp://localhost:5555') .. include:: _includes/requests.rst Exceptions ========== In the event of a communications problem, pyzmq raises `zmq.ZMQError `_:: try: server.request('go') except zmq.ZMQError as e: print(str(e)) .. include:: _includes/exceptions.rst Logging ======= .. include:: _includes/logging.rst The request format has these fields: :endpoint: The server endpoint, eg. ``http://localhost:5555``. :message: The JSON request (the body). The response format has these fields: :endpoint: The server endpoint, eg. ``http://localhost:5555``. :message: The JSON response (the body). Examples ======== - `ZeroMQ Client using PyZMQ `_ :doc:`Back home `