{ "info": { "author": "Vipin Sharma", "author_email": "sh.vipin@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2" ], "description": "# Pali\n\nPali is a simple Thread Pool library for Python. It is compatible with Python3 as well as Python2.\n\nPali can be used for:\n- Creating Data Pipelines.\n- Handling requests in Messaging Brokers (on the top of TCP/IP layer).\n- Simulating any stress testing systems.\n- API Testing systems.\n\nUsage\n------------\n\nPali is simple to use. Pali's Worker Pool works on tasks with well defined interface in ```pali.task.Task```.\nNew Tasks can be extended from it as following. ```_run``` method is important and mandatory to define as the\nThread Pool internally looks and invokes this function as start of the task.\n\n```\n>>> from pali import worker, task\n>>> class MyTask(task.Task):\n... def __init__(self, ident):\n... self.task_id = ident\n... self.done = False\n...\n... def _run(self):\n... self.done = True\n\n```\n\nThread Pool in itself can work either as context manager or can be invoked manually. Example below shows it's use\nas context manager.\n\n```\n# create 10 tasks\n>>> tasks = [MyTask(i) for i in range(10)]\n\n# Start a Thread Pool and push tasks on it.\n# Tasks are processed as and when they come.\n>>> with worker.ThreadPool(3) as tpool:\n... _ = [tpool.append_task(t) for t in tasks]\n\n# Check the status of Tasks\n>>> status = [t.done for t in tasks]\n>>> status\n[True, True, True, True, True, True, True, True, True, True]\n```\n\nFurther examples can be found at https://github.com/gitvipin/Pali/tree/master/tests that reflect different ways os using ThreadPool.\n\n\nRequirements\n------------\nPython 2.7+ and Python 3.4+\n\nShare and enjoy!\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/gitvipin/hemis/tree/master/projects/pali", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "pali", "package_url": "https://pypi.org/project/pali/", "platform": "", "project_url": "https://pypi.org/project/pali/", "project_urls": { "Homepage": "https://github.com/gitvipin/hemis/tree/master/projects/pali" }, "release_url": "https://pypi.org/project/pali/0.0.1/", "requires_dist": null, "requires_python": "", "summary": "A simple ThreadPool library", "version": "0.0.1" }, "last_serial": 5138874, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "cfbc831ecc2b54d8af1f1fb6ee3ac8e3", "sha256": "12f173c03a4d65afddf3aee1fce786d1b2c6b87529255c1c1e2184ca5748c789" }, "downloads": -1, "filename": "pali-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "cfbc831ecc2b54d8af1f1fb6ee3ac8e3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11353, "upload_time": "2019-04-13T18:40:22", "url": "https://files.pythonhosted.org/packages/a2/61/6a9b3258bcf3d8455e035f9cb7e1dbe52ae60f1d948b4c12a5c773dbbca9/pali-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ccd5fa2c8a96b83e90a9a5f571deee57", "sha256": "15285fbfb165b0afb8b94ddb933d65014c70e4e1388e9e82a00139854d86bab5" }, "downloads": -1, "filename": "pali-0.0.1.tar.gz", "has_sig": false, "md5_digest": "ccd5fa2c8a96b83e90a9a5f571deee57", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5355, "upload_time": "2019-04-13T18:40:25", "url": "https://files.pythonhosted.org/packages/1e/40/b3f9e442823c9a1d6b76e5a4a6f6aa5640cda96a6f50a861598ab256e17d/pali-0.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cfbc831ecc2b54d8af1f1fb6ee3ac8e3", "sha256": "12f173c03a4d65afddf3aee1fce786d1b2c6b87529255c1c1e2184ca5748c789" }, "downloads": -1, "filename": "pali-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "cfbc831ecc2b54d8af1f1fb6ee3ac8e3", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 11353, "upload_time": "2019-04-13T18:40:22", "url": "https://files.pythonhosted.org/packages/a2/61/6a9b3258bcf3d8455e035f9cb7e1dbe52ae60f1d948b4c12a5c773dbbca9/pali-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ccd5fa2c8a96b83e90a9a5f571deee57", "sha256": "15285fbfb165b0afb8b94ddb933d65014c70e4e1388e9e82a00139854d86bab5" }, "downloads": -1, "filename": "pali-0.0.1.tar.gz", "has_sig": false, "md5_digest": "ccd5fa2c8a96b83e90a9a5f571deee57", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5355, "upload_time": "2019-04-13T18:40:25", "url": "https://files.pythonhosted.org/packages/1e/40/b3f9e442823c9a1d6b76e5a4a6f6aa5640cda96a6f50a861598ab256e17d/pali-0.0.1.tar.gz" } ] }