tornado-slacker

This package provides an easy API for moving the work out of the tornado process / event loop
Download

tornado-slacker Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Publisher Name:
  • Mikhail Korobov
  • Publisher web site:
  • http://bitbucket.org/kmike/

tornado-slacker Tags


tornado-slacker Description

This package provides an easy API for moving the work out of the tornado process / event loop tornado-slacker is a Python library that provides an easy API for moving the work out of the tornado process / event loop.Currently implemented methods are:- execute the code in another server's http hook (django implementation is included);- execute the code in a separate thread (thread pool is used);- dummy immediate execution.API example:from django.contrib.auth.models import Userfrom slacker import adispfrom slacker import Slackerfrom slacker.workers import DjangoWorkerAsyncUser = Slacker(User, DjangoWorker())@adisp.processdef process_data(): # all the django ORM is supported; the query will be executed # on remote end, this will not block the IOLoop users = yield AsyncUser.objects.filter(is_staff=True) print users(pep-342 syntax and adisp library are optional, callback-style code is also supported)Installation:pip install tornado-slacker Requirements: · Python


tornado-slacker Related Software