aboutsummaryrefslogtreecommitdiffstats
path: root/python-tornado
diff options
context:
space:
mode:
Diffstat (limited to 'python-tornado')
-rw-r--r--python-tornado/README.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/python-tornado/README.md b/python-tornado/README.md
index 1d210f9..406b556 100644
--- a/python-tornado/README.md
+++ b/python-tornado/README.md
@@ -11,6 +11,20 @@ from Pubnub import PubnubTornado as Pubnub
pubnub = Pubnub(publish_key="demo", subscribe_key="demo", ssl_on=False)
+#### Publish Example
+```
+channel = 'hello_world'
+message = 'Hello World !!!'
+
+# Asynchronous usage
+
+
+def callback(message):
+ print(message)
+
+pubnub.publish(channel, message, callback=callback, error=callback)
+```
+
#### IO Event Loop
##### VERY IMPORTANT TO ADD THIS LINE AT THE VERY BOTTOM!