Python version support
Python SDK versions 5.0.0 and higher no longer support Python v2.7 and the Twisted and Tornado frameworks. If you require support for any of these, use SDK version 4.8.1.
Note that PubNub will stop supporting versions of Python lower than 3.7 by the end of 2021.
NOTICE: Based on current web trends and our own usage data, PubNub's Python Twisted SDK is deprecated as of May 1, 2019. Deprecation means we will no longer be updating the Python Twisted SDK but will continue to support users currently using it. Please feel free to use our other Python SDK offerings as they will continue to be supported and maintained. If you would like to use the Python Twisted SDK specifically, we would love to work with you on keeping this project alive!
This function will return a 17 digit precision Unix epoch.
The timetoken is constructed using the following algorithm:
timetoken = (Unix epoch time in seconds) * 10000000
Example of creating a timetoken for a specific time and date
08/19/2013 @ 9:20pm in UTC = 1376961606 timetoken = 1376961606 * 10000000 timetoken = 13769616060000000
Time you can use the following method(s) in Python-Twisted SDK:
d = pubnub.time().deferred() d.addCallback(my_callback)
time() operation returns a
PNTimeResponse which contains the following operations:
|Int||Returns an |
|String||Returns a |
|Date||Returns a |
Do not confuse with
timestamp() method, which is a shortcut to
Get Subscribed Channels
Returns all the subscribed channels in a
Get Subscribed Channels you can use the following method(s) in the Python-Twisted SDK:
channels = pubnub.get_subscribed_channels()
Get Subscribed Channel Groups
Returns all the subscribed channel groups in a
Get Subscribe Channel Groups you can use the following method(s) in the Python-Twisted SDK:
channels = pubnub.get_subscribed_channel_groups()