{"id":20905066,"url":"https://github.com/kaste/ndb-x","last_synced_at":"2025-03-12T21:26:53.768Z","repository":{"id":16489233,"uuid":"19241837","full_name":"kaste/ndb-x","owner":"kaste","description":"Synchronization primitives for ndb tasklets on Google AppEngine (GAE)","archived":false,"fork":false,"pushed_at":"2014-04-28T15:10:02.000Z","size":128,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-21T16:48:27.567Z","etag":null,"topics":["app-engine","google-appengine"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kaste.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-04-28T14:36:55.000Z","updated_at":"2022-06-14T19:53:01.000Z","dependencies_parsed_at":"2022-09-13T22:21:04.694Z","dependency_job_id":null,"html_url":"https://github.com/kaste/ndb-x","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaste%2Fndb-x","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaste%2Fndb-x/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaste%2Fndb-x/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kaste%2Fndb-x/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kaste","download_url":"https://codeload.github.com/kaste/ndb-x/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243296236,"owners_count":20268552,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["app-engine","google-appengine"],"created_at":"2024-11-18T13:21:33.027Z","updated_at":"2025-03-12T21:26:53.733Z","avatar_url":"https://github.com/kaste.png","language":"Python","readme":"Inspired by pythons new *asyncio*, this package implements the most basic synchronization primitives to work with ndb's tasklets for the Google AppEngine (GAE)\n\n\nInstall\n=======\n\n``pip install ndb-x``\n\n\n\nUsage\n=====\n\nWe have the three primitives ``Lock``, ``Semaphore`` and ``BoundedSemaphore``. Usage is, what you expect, straightforward::\n\n\n    from google.appengine.ext import ndb\n    from ndbx.locks import Lock\n\n\n    lock = Lock()\n\n\n    @ndb.tasklet\n    def work_async():\n        # using a context-manager will release the lock automatically\n        with (yield lock.acquire()):\n            rv = yield do_something_async()\n\n\n    @ndb.tasklet\n    def traditional_flow():\n        yield lock.acquire()\n        try:\n            # do something\n        finally:\n            lock.release()\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaste%2Fndb-x","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkaste%2Fndb-x","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkaste%2Fndb-x/lists"}