An asynchronous TCP eventbus Python client
Project description
vertx-python-client
An asynchronous TCP eventbus Python client other than the thread-based official client
Feature
- Use the event loop from Python 3 for high performance
- No dependency
- Provide a command line interface
Install
pip install vertx-python-client
Usage
Use as a standard Python library
from vertx import EventBus, Payload eb = EventBus(host='localhost', port=1234) eb.connect() eb.add_listen_func(address="api.versions", action=lambda x: print(x)) # Send the JSON binary reg = Payload(type="register", address="api.versions") eb.send(reg) pub = Payload(type="publish", address="api.versions.get", replyAddress="api.versions") eb.send(pub) # Quit the connection eb.disconnect()
Instead use from the command line interface
python -m vertx localhost:1234
> {"type": "register", "address": "api.versions"}
> {"type": "publish", "address": "api.versions.get", "replyAddress": "api.versions"}
> exit
Test
pytest --log-cli-level=DEBUG tests
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Filename, size | File type | Python version | Upload date | Hashes |
---|---|---|---|---|
Filename, size vertx_python_client-0.4.2-py3-none-any.whl (5.5 kB) | File type Wheel | Python version py3 | Upload date | Hashes View |
Filename, size vertx-python-client-0.4.2.tar.gz (4.0 kB) | File type Source | Python version None | Upload date | Hashes View |
Close
Hashes for vertx_python_client-0.4.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc005206cc563be66f04582b7a4957133c0a061773b0823089b9bc91ef7ad653 |
|
MD5 | c164cf09b0e8ca01d561b7ed64fc2d74 |
|
BLAKE2-256 | 3530e723d68f0c90648d40b92a6aa7d630ad4441d520d92ec6007c895dd3884f |
Close
Hashes for vertx-python-client-0.4.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | cde88e992e309a46351fcaf3de5ea57bf6d3d52e9507932622c2c9643e517b79 |
|
MD5 | fbfaa553f872470972f653d06650aa8c |
|
BLAKE2-256 | d32da4b771f064cfd9cb6e39297d4eef1c514e3cd664d55e478466f26885a011 |