Created
May 8, 2019 06:49
-
-
Save andeemarks/32d8d2a7f1dfe88991c8f3e2756b2246 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pubnub.callbacks import SubscribeCallback | |
from pubnub.enums import PNStatusCategory | |
from pubnub.pnconfiguration import PNConfiguration | |
from pubnub.pubnub import PubNub, SubscribeListener | |
import logging | |
import pubnub | |
pubnub.set_stream_logger('pubnub', logging.DEBUG) | |
pnconfig = PNConfiguration() | |
pnconfig.subscribe_key = 'sub-c-5f1b7c8e-fbee-11e3-aa40-02ee2ddab7fe' | |
pubnub = PubNub(pnconfig) | |
pubnub.add_listener(SubscribeListener()) | |
pubnub.subscribe().channels('pubnub-sensor-network').execute() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment