Metadata-Version: 1.0
Name: ndb-x
Version: 0.0.1
Summary: Synchronization primitives for ndb tasklets on Google App Engine (GAE)
Home-page: https://github.com/kaste/ndb-x
Author: herr kaste
Author-email: herr.kaste@gmail.com
License: MIT
Description: 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()
        
        
        
        
Platform: linux
Platform: osx
Platform: win32
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Topic :: Software Development :: Testing
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Utilities
Classifier: Programming Language :: Python
