[Twisted-Python] Announcing Crochet 0.7: Easily use Twisted from threaded applications
Dave Peticolas
dave at krondo.com
Fri May 24 09:16:52 MDT 2013
2013/5/24 Itamar Turner-Trauring <itamar at futurefoundries.com>
> 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:
>
> - Runs Twisted's reactor in a thread it manages.
> - Hooks up Twisted's log system to the Python standard library loggingframework. Unlike Twisted's built-in
> logging bridge, this includes support for blocking Handler instances.
> - Provides a blocking API to eventual results (i.e. Deferredinstances).
>
> This release includes better documentation and API improvements, as well
> as better error reporting.
>
> Here is a simple example of using Crochet:
>
> import sys
> from twisted.web.client import getPagefrom crochet import setup, run_in_reactorcrochet.setup()
> @run_in_reactordef download_page(url):
> return getPage(url)
> result = download_page(sys.argv[1])# wait() returns the result when it becomes available:print result.wait()
>
>
> You can see more examples, read the documentation, and download the
> package at:
>
> https://pypi.python.org/pypi/crochet
>
Awesome awesome awesome awesome.
Also, awesome.
--
--Dave Peticolas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/twisted-python/attachments/20130524/a5ea006f/attachment.html>
More information about the Twisted-Python
mailing list