{ "info": { "author": "Ted Tibbetts", "author_email": "intuited@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "``pqueue_fetcher``\n==================\n\nImplements a priority-queue-based fetching system.\n\nThe ``Fetcher`` class can be used by passing a ``fetch`` function\nwhich accepts locations of an arbitrary type.\n\nLocations can then be added via the fetcher's ``add`` method.\n\nIt is meant to manage fetches by interrupting timed-out calls to ``fetch``\nand by re-entering failed fetches back into the queue\nwith an altered priority.\n\nFetches which fail, either due to timeout\nor by virtue of being filtered out by a passed ``success`` function,\nare routed back into the source queue\nwith their priority altered by another passed function.\n\nSucceeding fetches are passed on to the ``results`` queue.\n\nThe ``fetch`` function may be any function which accepts a single parameter:\nthus the scope of tasks it may perform is relatively unrestricted.\n\nThe ``Fetcher`` constructor also accepts a numeric ``threadcount`` argument,\nwhich will determine the number of concurrent ``fetch`` functions to run.\n\nEach ``fetch`` call will be made in a newly spawned thread.\nThis is done as a relatively simple way to allow interruption\nof the call using the C ``PyThreadState_SetAsyncExc`` function.\n\n\nPortability\n-----------\n\nBecause of its use of CPython's underlying C API,\nthis module is not portable to other Python implementations.\n\n\nIssues\n------\n\nDue to deficiencies in Python's threading facilities\nwhich the author has been unable to work around,\nproblems may result if the passed ``fetch`` blocks on I/O.\n\nAn attempt has been made to work around these issues;\nsee the ``reactor`` function for details.\n\nDespite this attempt, the code is still markedly sketchy.\nConsider yourself warned.\n\nOf related note is the method ``test.FetcherTester.test_incorrect_fission``.\nThis test highlights the fragility of the I/O block workaround.\nSee the documentation for that method for more information.\n\n\nLicense\n-------\n\n``pqueue_fetcher`` is licensed under the MIT license.\n\nLicense details are provided in the file ``COPYING``.\n\n\nStatus\n------\n\nAlthough the module does pass its fairly simplistic test suite,\nthis is no guarantee of usability.\n\nIn particular, the module hasn't been used\nto do anything other than pass its test suite.\n\nDevelopers in search of a robust solution for multithreaded document retrieval\nare well advised to look elsewhere,\nprobably starting with the `twisted`_ framework.\n\n``pqueue_fetcher`` was undertaken\nmore as an exercise in multithreading and the use of queues\nthan for the sake of creating a usable body of code.\n\nIt is being published mostly as an example of these techniques,\nand for the sake of highlighting some of the difficulties\nin writing threaded Python code.\n\nThe module is also missing some obvious bits of functionality,\nsuch as the ability to set a retry limit.\n\nShould work continue on ``pqueue_fetcher``,\nit may prove more useful to allow the timeout logic\nto be handled by the ``fetch`` functions.\n\n\n.. _twisted: http://twistedmatrix.com/trac/", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/intuited/pqueue_fetcher", "keywords": "threading,multithreading,networking,queue,priority_queue", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "pqueue_fetcher", "package_url": "https://pypi.org/project/pqueue_fetcher/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pqueue_fetcher/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/intuited/pqueue_fetcher" }, "release_url": "https://pypi.org/project/pqueue_fetcher/0.0.6/", "requires_dist": null, "requires_python": null, "summary": "Implements a priority-queue-based fetching system.", "version": "0.0.6" }, "last_serial": 796643, "releases": { "0.0.6": [ { "comment_text": "", "digests": { "md5": "b95f5b48d6e4b294c7062ec8b2465baf", "sha256": "ae2182c14558b2943cd7147f0979938afba081adfa862c216fa3d7feb7c746d1" }, "downloads": -1, "filename": "pqueue_fetcher-0.0.6.tar.gz", "has_sig": false, "md5_digest": "b95f5b48d6e4b294c7062ec8b2465baf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7243, "upload_time": "2010-09-22T07:58:24", "url": "https://files.pythonhosted.org/packages/d8/ea/a7785c9365cd8d6754b28f8e22d03c80f9d85d775abe9bec995d01c66675/pqueue_fetcher-0.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b95f5b48d6e4b294c7062ec8b2465baf", "sha256": "ae2182c14558b2943cd7147f0979938afba081adfa862c216fa3d7feb7c746d1" }, "downloads": -1, "filename": "pqueue_fetcher-0.0.6.tar.gz", "has_sig": false, "md5_digest": "b95f5b48d6e4b294c7062ec8b2465baf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 7243, "upload_time": "2010-09-22T07:58:24", "url": "https://files.pythonhosted.org/packages/d8/ea/a7785c9365cd8d6754b28f8e22d03c80f9d85d775abe9bec995d01c66675/pqueue_fetcher-0.0.6.tar.gz" } ] }