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. 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.0.tar.gz (3.9 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.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file vertx-python-client-0.4.0.tar.gz.

File metadata

  • Download URL: vertx-python-client-0.4.0.tar.gz
  • Upload date:
  • Size: 3.9 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.0.tar.gz
Algorithm Hash digest
SHA256 ca5d6262bca53b0e16fd768aee800581ed7972f76497b00e8e2118bc7e3fbe2d
MD5 540f15d9308dadff8d40297d5b03ebec
BLAKE2b-256 c652c3919163fc75d7f4aefdf3692929fb4b991f344318b879d8c23ee5469082

See more details on using hashes here.

File details

Details for the file vertx_python_client-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: vertx_python_client-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 85bd688b6be5a4c14feeed76a22acf404b0ce478d71f38c6a3096ba9e2c6b9c9
MD5 0821bd3a7a09c61c69946f1a879229f1
BLAKE2b-256 3e4449104b0ccbd87d9347d83914f1d2372ee9d859984859466c6cd9341f3511

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