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.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vertx-python-client-0.4.2.tar.gz.
File metadata
- Download URL: vertx-python-client-0.4.2.tar.gz
- Upload date:
- Size: 4.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cde88e992e309a46351fcaf3de5ea57bf6d3d52e9507932622c2c9643e517b79
|
|
| MD5 |
fbfaa553f872470972f653d06650aa8c
|
|
| BLAKE2b-256 |
d32da4b771f064cfd9cb6e39297d4eef1c514e3cd664d55e478466f26885a011
|
File details
Details for the file vertx_python_client-0.4.2-py3-none-any.whl.
File metadata
- Download URL: vertx_python_client-0.4.2-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cc005206cc563be66f04582b7a4957133c0a061773b0823089b9bc91ef7ad653
|
|
| MD5 |
c164cf09b0e8ca01d561b7ed64fc2d74
|
|
| BLAKE2b-256 |
3530e723d68f0c90648d40b92a6aa7d630ad4441d520d92ec6007c895dd3884f
|