How to use the amqp.publish function in amqp

To help you get started, we’ve selected a few amqp examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github cloud4rpi / cloud4rpi / cloud4rpid.py View on Github external
def post_sensor_data(self, sensors_data):
        deviceId = config.get('Config', 'DeviceId')
        url = 'devices/%s/streams' % deviceId

        data = sensors_data
        data["device"] = deviceId
        amqp.publish(data)
        return 0 #TODO