aboutsummaryrefslogtreecommitdiffstats
path: root/python-twisted/README.md
diff options
context:
space:
mode:
authorDevendra2014-06-17 03:27:05 +0530
committerDevendra2014-06-17 03:27:05 +0530
commit2419ac0419fe74b582b94ed7784b3732049db9f2 (patch)
tree64ece8341a4328cc41879ee89ff951e9e56e3f0f /python-twisted/README.md
parent7865970148139babf2921b4d7fe11917568be9e9 (diff)
downloadpubnub-python-2419ac0419fe74b582b94ed7784b3732049db9f2.tar.bz2
readme changes
Diffstat (limited to 'python-twisted/README.md')
-rw-r--r--python-twisted/README.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/python-twisted/README.md b/python-twisted/README.md
index 47045f5..2abefd5 100644
--- a/python-twisted/README.md
+++ b/python-twisted/README.md
@@ -10,6 +10,20 @@ from Pubnub import PubnubTwisted as Pubnub
#### Init
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!