Skip to content

Latest commit

 

History

History
59 lines (38 loc) · 1.31 KB

README.md

File metadata and controls

59 lines (38 loc) · 1.31 KB

License Build Status

Micro-framework for Python RPC+Pub/Sub communication over WebSockets

Installation

sudo apt-get install python-dev libzmq3-dev avahi-daemon

# Disable avahi on init
sudo update-rc.d -f avahi-daemon remove

sudo pip install pyrainbow

Protocol

Rainbow protocol

Description

API description

Example

Basic example

from rainbow import register, run

@register
def add(a=0, b=0):
    return a + b

run(host='0.0.0.0')

Publish example

from rainbow import register, publish, run

@register
def pub():
    publish('event', 'data')

run(host='0.0.0.0')

Check more amazing examples!