Skip to main content

Bring autobahn to your synchronous apps !

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

autobahn-sync-0.3.1.tar.gz (7.7 kB view details)

Uploaded Source

File details

Details for the file autobahn-sync-0.3.1.tar.gz.

File metadata

File hashes

Hashes for autobahn-sync-0.3.1.tar.gz
Algorithm Hash digest
SHA256 49bd210d35749e77215d8c5629846789fd1727e8c79bdcea237226996bbb5275
MD5 38cafee6d152ea745a1c71e09e5eeac1
BLAKE2b-256 d7b326f766d4fec2b8290b9584288e1b02c091a135173db7e2b05ad3647ba04e

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page