The community forums are in BETA and closed to the public.

Python Echo Server using Publish and Subscribe

Python Echo Server using Publish and Subscribe

Python Echo Server: No binding sockets, no open ports.

It is easy to create a live running echo server using Python and PubNub. When you combine Python + PubNub, you add a layer of unexpected magic. This example demonstrates your newfound capability of running an echo server on your laptop and then receiving response on a separate laptop, all without opening ports or binding on a socket.

Install PIP Package Libs for PubNub Python

sudo pip install pubnub

Download Updated PubNub Python Twisted Lib

curl "" >

Download Echo Server

curl "" >

Download Echo Client

curl "" >

Run Echo Server

In a terminal window, start the echo server. ~~~ python ~~~

Run Echo Client

In a separate terminal window, run the echo client. ~~~ python ~~~

Using your newfound python code capability you can control remote devices in an RPC (Remote Procedure Call) fashion. You are securely exchanging messages between two endpoints, full remote control ready.

Python Echo Server Recorded Demonstration

Python Publish Subscribe Echo Server

ContentDTraceback (most recent call last): File "", line 86, in disconnect=onDisconnect File "/home/usuario/hierro/", line 1277, in subscribe _connect() File "/home/usuario/hierro/", line 1266, in _connect single=True, timeout=320) File "/home/usuario/hierro/", line 1673, in _request agent = ContentDecoderAgent(RedirectAgent(Agent( NameError: global name 'ContentDecoderAgent' is not defined ecoderAgent

Login or Signup to post a comment