# twisted integration for circuits

This repository is highly experimental and contains code to integrate the circuits framework with the twisted framework allowing developers of circuits to utilize twisted protocols and libraries in their circuits applications.

Note

You could also run your Twisted applications on top of the Circuits framework, but to be honest I'm not sure why you'd want to do that except to run a circuits application alongside a twisted one seamlessly.

The basic idea here is to:

• Implement a CircuitsReactor that allows (with 2 lines of code) twisted applications to run on top of circuits
• Provide other useful integration mechanisms to allow twisted and circuits to interoperate.

The plan is (when this matures) is to pull this into the core circuits framework possibly as circuits.integration.twisted.

If you'd like to play with this follow these instructions:

# Firstly install a development version of circuits:

$mkvirtualenv circuits$ hg clone https://bitbucket.org/circuits/circuits-dev
$cd circuits-dev$ python setup.py develop


# Install twisted:

$pip install twisted  # Install this repository somewhere ot play with: $ hg clone https://bitbucket.org/circuits/twistedintegration


And hack way at any of the samples. If you'd like to test this out on a twisted library or application simply add the following two lines:

import circuitsreactor
circuitsreactor.install()


And put circuitsreactor.py somewhere in the \$PYTHONPATH.

Enjoy :) --JamesMills / prologic