{"id":20204207,"url":"https://github.com/openbridge/txpool_py3","last_synced_at":"2026-06-09T15:01:34.908Z","repository":{"id":73272240,"uuid":"218305646","full_name":"openbridge/txpool_py3","owner":"openbridge","description":"Port of txpool library to python3","archived":false,"fork":false,"pushed_at":"2023-01-18T11:02:59.000Z","size":37,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-03T09:22:45.367Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/openbridge.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-10-29T14:23:29.000Z","updated_at":"2021-10-12T11:00:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"e5ed50cf-e099-460d-9188-a98a6935bc56","html_url":"https://github.com/openbridge/txpool_py3","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/openbridge/txpool_py3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openbridge%2Ftxpool_py3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openbridge%2Ftxpool_py3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openbridge%2Ftxpool_py3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openbridge%2Ftxpool_py3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openbridge","download_url":"https://codeload.github.com/openbridge/txpool_py3/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openbridge%2Ftxpool_py3/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34112225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-09T02:00:06.510Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-14T05:09:08.542Z","updated_at":"2026-06-09T15:01:34.888Z","avatar_url":"https://github.com/openbridge.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"txpool\n======\n\nSummary\n-------\nA persistent process pool in Python for use with [Twisted](http://twistedmatrix.com).\nProvides the ability to run Python callables asynchronously within a pool of\npersistent processes, as long as the callables, their arguments, and their return\nvalues are all picklable.\n\nInstalling\n----------\n```sh\npip install txpool\n```\n\nExamples\n--------\nHere are some simple examples to give you the idea:\n\n```python\n    import glob\n    from twisted.internet import reactor\n    from twisted.internet.defer import inlineCallbacks\n    import txpool\n\n    pool = txpool.Pool()\n\n    @inlineCallbacks\n    def main():\n        result = yield pool.apply_async(glob.glob, ('*.pdf',))\n        print result\n        reactor.stop()\n\n    reactor.callWhenRunning(main)\n    reactor.run()\n```\n\nThe callable can instead be specified as a string, using dotted notation to\nspecify the full path to the callable.\n\n```python\n    from twisted.internet import reactor\n    from twisted.internet.defer import inlineCallbacks\n    import txpool\n\n    pool = txpool.Pool()\n\n    @inlineCallbacks\n    def main():\n        # You can provide an optional timeout (in seconds) for the call\n        # (the default is None).\n        try:\n            result = yield pool.apply_async('glob.glob', ('*.pdf',), timeout=5)\n        except txpool.PoolTimeout as e:\n            result = e\n        print result\n        reactor.stop()\n\n    reactor.callWhenRunning(main)\n    reactor.run()\n```\n\nThe *txpool.Pool* class can be explicitly sized, asked to log its actions,\nand/or given a custom name.\n\n```python\n    import logging\n    from twisted.internet import reactor\n    from twisted.internet.defer import inlineCallbacks, gatherResults\n    import txpool\n\n    logger = logging.getLogger('example')\n    logger.addHandler(logging.StreamHandler())\n    logger.setLevel(logging.DEBUG)\n\n    pool = txpool.Pool(size=5, log=logger, name='twisting-by-the-pool')\n\n    @inlineCallbacks\n    def main():\n        calls = ('math.factorial',) * 5\n        args = [(n,) for n in range(150780, 150785)]\n\n        # You can wait until the pool is at full-strength (providing an\n        # optional timeout if desired), but it's not required before\n        # calling the \"apply_async\" method.  Jobs are queued until a\n        # worker process is available.\n        try:\n            yield pool.on_ready(timeout=10)\n        except txpool.PoolTimeout as e:\n            results = e\n        else:\n            results = yield gatherResults(map(pool.apply_async, calls, args))\n\n        print results\n\n        try:\n            # You can gracefully close the pool, which ensures all jobs\n            # already queued are completed before shutting down...\n            yield pool.close(timeout=10)\n        except txpool.PoolTimeout as e:\n            print e\n            # ...or you can use force and immediately send SIGKILL to each\n            # process in the pool.\n            yield pool.terminate(timeout=10)\n\n        reactor.stop()\n\n    reactor.callWhenRunning(main)\n    reactor.run()\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenbridge%2Ftxpool_py3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenbridge%2Ftxpool_py3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenbridge%2Ftxpool_py3/lists"}