Skip to main content

Twisted bindings for ZeroMQ

Project description

https://img.shields.io/pypi/pyversions/txZMQ-ng.svg https://img.shields.io/pypi/v/txZMQ-ng https://img.shields.io/pypi/l/txZMQ-ng https://img.shields.io/pypi/dw/txZMQ-ng https://img.shields.io/pypi/pyversions/txZMQ-ng.svg)

Introduction

This is a fork of the original project at https://github.com/smira/txZMQ, since it is no longer maintained.

txZMQ allows to integrate easily ØMQ sockets into Twisted event loop (reactor).

txZMQ supports both CPython and PyPy and ØMQ library version 2.2.x or 3.2.x.

Documentation is available at ReadTheDocs.

Requirements

C library required:

  • ØMQ library 2.2.x or 3.2.x

Python packages required:

  • pyzmq >= 13 (for CPython & PyPy)

  • Twisted

Details

txZMQ introduces support for general 0MQ sockets by class ZmqConnection that can do basic event loop integration, sending-receiving messages in non-blocking manner, scatter-gather for multipart messages.

txZMQ uses ØMQ APIs to get file descriptor that is used to signal pending actions from ØMQ library IO thread running in separate thread. This is used in a custom file descriptor reader, which is then added to the Twisted reactor.

Upgrading from 0.3.x

If you’re upgrading from version 0.3.1 and earlier, please apply following changes to your code:

  • root package name was changed from txZMQ to txzmq, adjust your imports accordingly;

  • ZmqEndpointType.Connect has been renamed to ZmqEndpointType.connect;

  • ZmqEndpointType.Bind has been renamed to ZmqEndpointType.bind;

  • ZmqConnection.__init__ has been changed to accept keyword arguments instead of list of endpoints; if you were using one endpoint, no changes are required; if using multiple endpoints, please look for add_endpoints method.

Hacking

Source code for txZMQ is available at github; forks and pull requests are welcome.

To start hacking, fork at github and clone to your working directory. To use the Makefile (for running unit tests, checking for PEP8 compliance and running pyflakes), you will want to have virtualenv installed (it includes a pip installation).

Create a branch, add some unit tests, write your code, check it and test it! Some useful make targets are:

  • make env

  • make check

  • make test

If you don’t have an environment set up, a new one will be created for you in ./env. Additionally, txZMQ will be installed as well as required development libs.

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

txZMQ-ng-1.0.3.tar.gz (29.7 kB view details)

Uploaded Source

Built Distribution

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

txZMQ_ng-1.0.3-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

Details for the file txZMQ-ng-1.0.3.tar.gz.

File metadata

  • Download URL: txZMQ-ng-1.0.3.tar.gz
  • Upload date:
  • Size: 29.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for txZMQ-ng-1.0.3.tar.gz
Algorithm Hash digest
SHA256 81ea6f9d31ee11f7e1396fdd2612d1e03950b378ba339236deeeea6f427b70d9
MD5 40a14abd6483d6223d65f4ae5bb8b441
BLAKE2b-256 43b75bf9093d883a06a29eb9abc414f94310654957ecf29697863b3f8af58273

See more details on using hashes here.

File details

Details for the file txZMQ_ng-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: txZMQ_ng-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 24.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for txZMQ_ng-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b9d1dd39c4d12be7c3025b98c7f1e67d037c0b9cdd932e00627c787522f09db0
MD5 0007f8e31f695794c0d0a4bcf1920fcc
BLAKE2b-256 50bc5094ccbfd87f36e59205c2497f069dc49920bb5cb807e8d92062ca81060f

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