Bring autobahn to your synchronous apps !
Project description
Autobahn~Sync
Autobahn integration with crochet to provide WAMP for synchronous applications.
Originaly based on the work of Sam & Max.
Quick example
from autobahn_sync import publish, call, register, subscribe, start
start()
@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)
print(call('com.app.shout', 'Autobahn is cool !'))
publish('com.app.idea', 'Use autobahn everywhere !')
This code will connect to the crossbar router (don’t forget to start it before trying this snippet !) listenening 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
Release history Release notifications | RSS feed
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.1.2.tar.gz
(3.6 kB
view details)
File details
Details for the file autobahn-sync-0.1.2.tar.gz
.
File metadata
- Download URL: autobahn-sync-0.1.2.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c7d5bc9f7752270a06c1f7ac7b7b2ff29e85d5b80612440b652565fc0ce2068 |
|
MD5 | 2d3e8097e9d7e181e7b9247971ba4f3f |
|
BLAKE2b-256 | 7307af7e357b17ea325fe3957159ec5dade5a2efd37e49bae07ff256db163599 |