Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install gaedeferred

How to install gaedeferred

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install gaedeferred
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.1
0.2.1 Failed View build log
0.2 Failed View build log
0.1 Available View build log
0.1dev Failed View build log
Windows (64-bit)
0.1
0.2.1 Failed View build log
0.2 Failed View build log
0.1 Available View build log
0.1dev Failed View build log
Mac OS X (10.5+)
0.1
0.2.1 Failed View build log
0.2 Failed View build log
0.1 Available View build log
0.1dev Failed View build log
Linux (32-bit)
0.1
0.2.1 Failed View build log
0.2 Failed View build log
0.1 Available View build log
0.1dev Failed View build log
Linux (64-bit)
0.1
0.2.1 Failed View build log
0.2 Failed View build log
0.1 Available View build log
0.1dev Failed View build log
 
License
MIT License
Imports
Lastest release
version 0.2.1 on Jan 12th, 2011

What's this

gaedeferred is a module to make deferred chain on Google Appengine. By lack of taskqueue API and ext.deferred design, there is no support for error case handling as errback and for collecting task result.

This module is inspired by Twisted.

How to

Follow steps.:

>>> from google.appengine.ext import deferred
>>> from gaedeferred import Deferred
>>> from tests.test_deferred import increase, must_be
>>> d = Deferred()

You can regist a callback and use alias. >>> d.addCallback(increase, 10).next(must_be, 15) # doctest: +ELLIPSIS <gaedeferred.deferred.Deferred object at ...>

The deferred chain is to be executed in an asynchronous task. So the function increase will be called with params 5 and 10 later. >>> deferred.defer(d.callback, 5) # doctest: +ELLIPSIS <google.appengine.api.taskqueue.taskqueue.Task object at ...>

More details, see tests. Also it has how to use DeferredList.

How to test

Use nose with NoseGAE.:

$ nosetests

Or:

$ python setup.py test

To test, this module requires nose and some modules.

  • nose
  • NoseGAE
  • gaetestbed

System Message: WARNING/2 (<string>, line 54)

Bullet list ends without a blank line; unexpected unindent.

https://github.com/jgeewax/gaetestbed with a patch. https://github.com/jgeewax/gaetestbed/pull/10 - WebTest - docutils

Note, they will be installed automatically when you run "python setup.py test".

To do

  • Consider transaction control of DeferredList doing.

Questions and Bug Reports

  • Site

System Message: WARNING/2 (<string>, line 71)

Bullet list ends without a blank line; unexpected unindent.

https://github.com/jbking/gaedeferred

  • Or, cantact me.

System Message: WARNING/2 (<string>, line 74)

Bullet list ends without a blank line; unexpected unindent.

MURAOKA Yusuke <yusuke@jbking.org>

Changes

0.2.1
  • Fixed a behaviour of DeferredList failing case.
  • Supports lack of a style callback chain.

System Message: WARNING/2 (<string>, line 85)

Bullet list ends without a blank line; unexpected unindent.

Deferred(...).next(...).next(...).addBoth(...) - consumeError of DeferredList is now default True. - DeadlineExceededError should not be catched in Deferred default. You can still avoid this behaviour change by defining _raise_exception_types.

0.2
  • Added DeferredList.
  • Made tests robust by changing test runner to nose

System Message: WARNING/2 (<string>, line 95)

Bullet list ends without a blank line; unexpected unindent.

with NoseGAE and gaetestbed. - Some bugs fixed. - Moved developping repository to github.

0.1
  • Incompatible API change between 0.1dev to 0.1.

System Message: WARNING/2 (<string>, line 103)

Bullet list ends without a blank line; unexpected unindent.

It was my misunderstanding of Twisted deferred.

Subscribe to package updates

Last updated Jan 12th, 2011

Download Stats

Last month:2

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.