Skip to main content

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

  1. Use the event loop from Python 3 for high performance
  2. No dependency
  3. 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

vertx-python-client-0.4.2.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vertx_python_client-0.4.2-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

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

Hashes for vertx-python-client-0.4.2.tar.gz
Algorithm Hash digest
SHA256 cde88e992e309a46351fcaf3de5ea57bf6d3d52e9507932622c2c9643e517b79
MD5 fbfaa553f872470972f653d06650aa8c
BLAKE2b-256 d32da4b771f064cfd9cb6e39297d4eef1c514e3cd664d55e478466f26885a011

See more details on using hashes here.

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

Hashes for vertx_python_client-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 cc005206cc563be66f04582b7a4957133c0a061773b0823089b9bc91ef7ad653
MD5 c164cf09b0e8ca01d561b7ed64fc2d74
BLAKE2b-256 3530e723d68f0c90648d40b92a6aa7d630ad4441d520d92ec6007c895dd3884f

See more details on using hashes here.

Supported by

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