quickpool


Namequickpool JSON
Version 1.0.2 PyPI version JSON
download
home_page
SummaryUse ProcessPoolExecutor and ThreadPoolExecutor from concurrent.futures with a progress bar and less boilerplate.
upload_time2024-02-20 19:10:17
maintainer
docs_urlNone
author
requires_python>=3.10
license
keywords concurrent futures multiprocess multithread
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # quickpool

Use ProcessPoolExecutor and ThreadPoolExecutor from concurrent.futures with a progress bar and less boilerplate.

## Installation

Install with:

<pre>
pip install quickpool
</pre>

## Usage

<pre>
>>> import random
>>> import time
>>> import quickpool
>>> def naptime(base_duration: float, multiplier: float, return_val: int)->int:
...   time.sleep(base_duration * multiplier)
...   return return_val
...
>>> def demo():
...   iterations = 25
...   pool = quickpool.ThreadPool(
...   functions = [naptime] * iterations,
...   args_list = [(random.random() * 5, random.random()) for _ in range(iterations)],
...   kwargs_list = [{"return_val": i} for i in range(iterations)])
...   results = pool.execute()
...   print(results)
...
>>> demo()
 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 3s
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]
</pre>

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "quickpool",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": "",
    "keywords": "concurrent,futures,multiprocess,multithread",
    "author": "",
    "author_email": "Matt Manes <mattmanes@pm.me>",
    "download_url": "https://files.pythonhosted.org/packages/cd/73/b797cc3775ebb5a810323858b992ed9c765dea0ce4cf0679406e2f14d560/quickpool-1.0.2.tar.gz",
    "platform": null,
    "description": "# quickpool\n\nUse ProcessPoolExecutor and ThreadPoolExecutor from concurrent.futures with a progress bar and less boilerplate.\n\n## Installation\n\nInstall with:\n\n<pre>\npip install quickpool\n</pre>\n\n## Usage\n\n<pre>\n>>> import random\n>>> import time\n>>> import quickpool\n>>> def naptime(base_duration: float, multiplier: float, return_val: int)->int:\n...   time.sleep(base_duration * multiplier)\n...   return return_val\n...\n>>> def demo():\n...   iterations = 25\n...   pool = quickpool.ThreadPool(\n...   functions = [naptime] * iterations,\n...   args_list = [(random.random() * 5, random.random()) for _ in range(iterations)],\n...   kwargs_list = [{\"return_val\": i} for i in range(iterations)])\n...   results = pool.execute()\n...   print(results)\n...\n>>> demo()\n \u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501 100% 3s\n[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24]\n</pre>\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Use ProcessPoolExecutor and ThreadPoolExecutor from concurrent.futures with a progress bar and less boilerplate.",
    "version": "1.0.2",
    "project_urls": {
        "Documentation": "https://github.com/matt-manes/quickpool/tree/main/docs",
        "Homepage": "https://github.com/matt-manes/quickpool",
        "Source code": "https://github.com/matt-manes/quickpool/tree/main/src/quickpool"
    },
    "split_keywords": [
        "concurrent",
        "futures",
        "multiprocess",
        "multithread"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f68c8c7a02a839c175791bbcfdfd67a6e10d5f7c5b399f8146ffb99e893f2f59",
                "md5": "ce8e3fce3fc8cecd10acff67a47fff0c",
                "sha256": "8672d74cbf263df29629cbcb072bb2084b98064d36003151699a54db8271c2d5"
            },
            "downloads": -1,
            "filename": "quickpool-1.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ce8e3fce3fc8cecd10acff67a47fff0c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 5230,
            "upload_time": "2024-02-20T19:10:16",
            "upload_time_iso_8601": "2024-02-20T19:10:16.191177Z",
            "url": "https://files.pythonhosted.org/packages/f6/8c/8c7a02a839c175791bbcfdfd67a6e10d5f7c5b399f8146ffb99e893f2f59/quickpool-1.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cd73b797cc3775ebb5a810323858b992ed9c765dea0ce4cf0679406e2f14d560",
                "md5": "a2af19c9261b1a167ce0c134b4cf45e9",
                "sha256": "cca4e252100785dbc434f55b515f4cb41390d583cfb69267191041ecd434670a"
            },
            "downloads": -1,
            "filename": "quickpool-1.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "a2af19c9261b1a167ce0c134b4cf45e9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 4393,
            "upload_time": "2024-02-20T19:10:17",
            "upload_time_iso_8601": "2024-02-20T19:10:17.300688Z",
            "url": "https://files.pythonhosted.org/packages/cd/73/b797cc3775ebb5a810323858b992ed9c765dea0ce4cf0679406e2f14d560/quickpool-1.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-20 19:10:17",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "matt-manes",
    "github_project": "quickpool",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "quickpool"
}
        
Elapsed time: 3.25223s