Inspired by pythons new asyncio, this package implements the most basic synchronization primitives to work with ndb’s tasklets for the Google AppEngine (GAE)
Install
pip install ndb-x
Usage
We have the three primitives Lock, Semaphore and BoundedSemaphore. Usage is, what you expect, straightforward:
from google.appengine.ext import ndb
from ndbx.locks import Lock
lock = Lock()
@ndb.tasklet
def work_async():
# using a context-manager will release the lock automatically
with (yield lock.acquire()):
rv = yield do_something_async()
@ndb.tasklet
def traditional_flow():
yield lock.acquire()
try:
# do something
finally:
lock.release()
Metadata
Release files for ndb-x 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ndb-x-0.0.1.zip | 8.2 kB | Without provenance | Details for ndb-x-0.0.1.zip |
Release files / ndb-x-0.0.1.zip
| Download URL | ndb-x-0.0.1.zip |
|---|---|
| Size | 8.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
44727faa5778d9946f34e47d75fa2fca9eac0740dec77dbc7a900406080b8aaf
|
|
BLAKE2b-256 checksum How to use checksums |
713e7b25ff5360a120f508cff33f2f6c08987ddd13d2dc0d9e8f85e45a9f408f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for ndb-x 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.