Successor of the deferred library shipped with Google AppEngine (GAE)
Project description
Successor of the so useful deferred library on Google AppEngine (GAE).
It should fix some issues. It should work async.
Usage
By example:
from google.appengine.ext import ndb
import deferred2 as deferred
def work(message):
pass
@ndb.tasklet
def defer_one_task():
yield deferred.defer_async(work, 'to be done')
@ndb.tasklet
def defer_multiple_tasks():
yield deferred.defer_multi_async(
deferred.task(work, 'Hello'),
deferred.task(work, 'world!'))
@ndb.tasklet
def defer_deferring():
# this one enqueues one task right now, which will then add all the
# other tasks
yield deferred.one_shot_async(
deferred.task(work, 'Hello'),
deferred.task(work, 'world!'))
You see, it pretty much looks and works as before.
Changes
transactional’s new default is auto (instead of False), t.i. if your inside a transaction it will be set to True, otherwise it will be False
You can set _urlsuffix which can be a str or a sequence of strs; which will get appended to the url. Pure cosmetics.
In case you set a name that is too long or contains invalid characters, a hash of the name will be used instead.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file deferred2-0.0.1.tar.gz.
File metadata
- Download URL: deferred2-0.0.1.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a7c402d2b3c4de5aa4bea1a95a7bf5d0b774c4260c70f00ac81bf30606c0cfb
|
|
| MD5 |
4a70ce54fc4d4d1b520dc3205f44135b
|
|
| BLAKE2b-256 |
e9cce620bb21d1840fa867fa0bf268e4d306805cb4be850ad6b7e8d706ae7948
|
File details
Details for the file deferred2-0.0.1-py2-none-any.whl.
File metadata
- Download URL: deferred2-0.0.1-py2-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bcdf5f00ecc7e62b191d8ea6fa57b329e1b13d7ee0300211f6f20ca5d911cce
|
|
| MD5 |
de757bc0a0e3238efc621099b6003890
|
|
| BLAKE2b-256 |
585e00be0555f1809426dd5d4c144737080392c486afc41f4729fe87b91f83d3
|