apply-async


Nameapply-async JSON
Version 0.1.2 PyPI version JSON
download
home_page
Summary
upload_time2023-03-29 22:59:07
maintainer
docs_urlNone
authorJeff Shen
requires_python>=3.10,<4.0
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # apply_async

If you have a large number of files and you need to apply a function to each of them to get some outputs, then this is for you.

This provides a function called `apply_async` which takes in a list of filenames and a function to apply, and does the following for you:

- batches the files
- applies your function to each batch asynchronously
- controls the number of batches to process at a time, and automatically adds new batches when old ones complete
- shows a progress bar for each batch

## Installation

From pip:

```bash
pip install apply_async
```

Latest version (from source):

```bash
pip install "git+https://github.com/al-jshen/apply_async"
```

## Demo

<img width="656" alt="Screenshot 2023-03-29 at 6 26 16 PM" src="https://user-images.githubusercontent.com/22137276/228681583-98f65227-68fe-472a-a3e1-ab320bdb60cb.png">


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "apply-async",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Jeff Shen",
    "author_email": "shenjeff@princeton.edu",
    "download_url": "https://files.pythonhosted.org/packages/a1/99/8b8684456fa3735f5b7b73a2abcf78e636de1a1ba78a24c7b14455866871/apply_async-0.1.2.tar.gz",
    "platform": null,
    "description": "# apply_async\n\nIf you have a large number of files and you need to apply a function to each of them to get some outputs, then this is for you.\n\nThis provides a function called `apply_async` which takes in a list of filenames and a function to apply, and does the following for you:\n\n- batches the files\n- applies your function to each batch asynchronously\n- controls the number of batches to process at a time, and automatically adds new batches when old ones complete\n- shows a progress bar for each batch\n\n## Installation\n\nFrom pip:\n\n```bash\npip install apply_async\n```\n\nLatest version (from source):\n\n```bash\npip install \"git+https://github.com/al-jshen/apply_async\"\n```\n\n## Demo\n\n<img width=\"656\" alt=\"Screenshot 2023-03-29 at 6 26 16 PM\" src=\"https://user-images.githubusercontent.com/22137276/228681583-98f65227-68fe-472a-a3e1-ab320bdb60cb.png\">\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "",
    "version": "0.1.2",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3aad5f1201115290c643709f88a4a687e751f62e5ec4cacb747ba9c092dc6ea4",
                "md5": "96094c414b8d3dd61dd37ba11c69f9ee",
                "sha256": "dd87d42a31387bf3c684eb0e0dec63c61eed39536e620e82925360ba8ac0d2f8"
            },
            "downloads": -1,
            "filename": "apply_async-0.1.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "96094c414b8d3dd61dd37ba11c69f9ee",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 3191,
            "upload_time": "2023-03-29T22:59:05",
            "upload_time_iso_8601": "2023-03-29T22:59:05.717658Z",
            "url": "https://files.pythonhosted.org/packages/3a/ad/5f1201115290c643709f88a4a687e751f62e5ec4cacb747ba9c092dc6ea4/apply_async-0.1.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a1998b8684456fa3735f5b7b73a2abcf78e636de1a1ba78a24c7b14455866871",
                "md5": "1e7ba0e2f3073784c9a2c499df0c008e",
                "sha256": "8f47630e587ba66c57b962e916dda45117bee09497ece6e9f3be9afbf2ff9583"
            },
            "downloads": -1,
            "filename": "apply_async-0.1.2.tar.gz",
            "has_sig": false,
            "md5_digest": "1e7ba0e2f3073784c9a2c499df0c008e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 3079,
            "upload_time": "2023-03-29T22:59:07",
            "upload_time_iso_8601": "2023-03-29T22:59:07.626740Z",
            "url": "https://files.pythonhosted.org/packages/a1/99/8b8684456fa3735f5b7b73a2abcf78e636de1a1ba78a24c7b14455866871/apply_async-0.1.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-29 22:59:07",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "apply-async"
}
        
Elapsed time: 0.05493s