Python API Quick Start

Installation

pip install scaledrone

Usage

Create a new instance of Scaledrone client passing it the channel_id and secret_key that you can find from your channel's page from Scaledrone's dashboard.

from scaledrone import Scaledrone

drone = Scaledrone('channel_id', 'secret_key')

Sending messages

Rooms are used to isolate different message types. To listen to messages, you need to subscribe to a specific room.
Users can freely connect to multiple rooms (this does not create extra connections).

room = 'notifications'
message = {'foo': 'bar'}
response = drone.publish(room, message)