Skip to content
ZeroMQ bindings for Twisted
Python Makefile
Latest commit 2843571 Aug 14, 2015 @smira Merge pull request #63 from tisdall/py3k
Py3k support
Failed to load latest commit information.
docs Move parts of README to docs, examples in docs. #46 Oct 11, 2013
examples Add timeout feature for request/reply pattern. #54 May 16, 2014
txzmq complete py3k support Aug 7, 2015
.coveragerc
.gitignore Support for coverage measurement and coveralls.io Oct 15, 2013
.travis.yml Merge pull request #63 from tisdall/py3k Aug 14, 2015
AUTHORS.txt
LICENSE.txt Update FSF address. May 13, 2013
MANIFEST.in Include "VERSION" in tarball. Apr 28, 2014
Makefile Try to build in travis's virtual env. Oct 10, 2013
README.rst txZMQ 0.7.1: preliminary support for Python3. Apr 18, 2014
VERSION Version bump 0.7.4. Mar 23, 2015
python-txzmq.spec Remove trailing spaces. Aug 1, 2012
requirements.txt Support for coverage measurement and coveralls.io Oct 15, 2013
setup.py

README.rst

Twisted bindings for 0MQ

https://travis-ci.org/smira/txZMQ.png?branch=master https://coveralls.io/repos/smira/txZMQ/badge.png https://pypip.in/v/txZMQ/badge.png https://pypip.in/d/txZMQ/badge.png

Introduction

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. Preliminary support for Python 3.x is available.

Documentation is available at ReadTheDocs and CI is done by Travis CI.

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.

Something went wrong with that request. Please try again.