Skip to content

richardartoul/autobahn-sync

This branch is up to date with Scille/autobahn-sync:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

d75fcef · May 27, 2016

History

94 Commits
May 26, 2016
Feb 24, 2016
May 27, 2016
May 26, 2016
Feb 20, 2016
May 26, 2016
Feb 24, 2016
Feb 26, 2016
Feb 24, 2016
May 26, 2016
May 26, 2016
May 26, 2016

Repository files navigation

Travis-CI Code coverage Documentation Status

Autobahn~Sync

Autobahn integration with crochet to provide WAMP for synchronous applications.

Originaly based on the work of Sam & Max (warning: French, pr0n and awesomeness inside !).

Quick example

from time import sleep
from autobahn_sync import publish, call, register, subscribe, run


@register('com.app.shout')
def shout(msg):
    return msg.upper()


@subscribe('com.app.idea')
def on_thought(msg):
    print("I've just had a new idea: %s" % msg)


run()
while True:
    print(call('com.app.shout', 'Autobahn is cool !'))
    publish('com.app.idea', 'Use autobahn everywhere !')
    sleep(1)

This code will connect to the crossbar router (don't forget to start it before trying this snippet !) listening ws://127.0.0.1:8080/ws and register itself in realm realm1.

Also see the examples for more usecases

Bonus

See extensions folder for a nice Flask extension ;-)

Get it now

pip install -U autobahn-sync

License

MIT licensed. See the bundled LICENSE file for more details.

About

Bring autobahn to your synchronous apps !

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%