<div dir="ltr">Truly fantastic!  Thanks for this.</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 24, 2013 at 8:51 AM, Itamar Turner-Trauring <span dir="ltr">&lt;<a href="mailto:itamar@futurefoundries.com" target="_blank">itamar@futurefoundries.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Crochet is an MIT-licensed library that makes it easier for threaded
applications like Flask or Django to use the Twisted networking framework. Features include:<br><ul><li>Runs Twisted&#39;s reactor in a thread it manages.</li><li>Hooks up Twisted&#39;s log system to the Python standard library <tt>logging</tt>
framework. Unlike Twisted&#39;s built-in <tt>logging</tt> bridge, this includes
support for blocking <cite>Handler</cite> instances.</li><li>Provides a blocking API to eventual results (i.e. <tt>Deferred</tt> instances).</li></ul>This release includes better documentation and API improvements, as well as better error reporting.<br>

<br></div><div>Here is a simple example of using Crochet:<br><pre><span>import</span> <span>sys</span>

<span>from</span> <span>twisted.web.client</span> <span>import</span> <span>getPage</span>
<span>from</span> <span>crochet</span> <span>import</span> <span>setup</span><span>,</span> <span>run_in_reactor</span>
<span>crochet</span><span>.</span><span>setup</span><span>()</span>

<span>@run_in_reactor</span>
<span>def</span> <span>download_page</span><span>(</span><span>url</span><span>):</span>
    <span>return</span> <span>getPage</span><span>(</span><span>url</span><span>)</span>

<span>result</span> <span>=</span> <span>download_page</span><span>(</span><span>sys</span><span>.</span><span>argv</span><span>[</span><span>1</span><span>])</span>
<span># wait() returns the result when it becomes available:</span>
<span>print</span> <span>result</span><span>.</span><span>wait</span><span>()</span></pre><br></div>You can see more examples, read the documentation, and download the package at:<br>
<br><a href="https://pypi.python.org/pypi/crochet" target="_blank">https://pypi.python.org/pypi/crochet</a><span class="HOEnZb"><font color="#888888"><br clear="all"><div><div><br>-- <br>Itamar Turner-Trauring, Future Foundries LLC<br>
<a href="http://futurefoundries.com/" target="_blank">http://futurefoundries.com/</a> — Twisted consulting, training and support.<br>

</div></div></font></span></div>
<br>_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br>--<div>Kevin Horn</div>
</div>