easymp


Nameeasymp JSON
Version 0.1.8 PyPI version JSON
download
home_pagehttps://github.com/MNayer/easymp
SummaryPython utility for easy multiprocessing + logging.
upload_time2023-05-05 14:48:53
maintainer
docs_urlNone
authorMNayer
requires_python
license0BSD
keywords multiprocessing logging
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # EasyMP
Easy multiprocessing and logging (SimpleMP) provides a solution for the two problems:
1. Logging while using python multiprocessing.
2. Stopping spawned processes using CTRL+C.

## Install
```bash
pip install easymp 
```

## Example
```python
from easymp import parallel, addlogging, execute


@addlogging
def square(x):
    logger.info("Square: %d" % x)
    return x * x


@addlogging
@parallel
def process(x):
    y = square(x)
    logger.info("Input %d, output %d." % (x, y))
    return True


if __name__ == "__main__":
    execute(process, it=range(20), nprocs=3)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/MNayer/easymp",
    "name": "easymp",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "multiprocessing logging",
    "author": "MNayer",
    "author_email": "marie.nayer@web.de",
    "download_url": "https://files.pythonhosted.org/packages/2f/75/be400b280d811597ada990e316760efd1106cea8a5ef7172a8ef54db9393/easymp-0.1.8.tar.gz",
    "platform": null,
    "description": "# EasyMP\nEasy multiprocessing and logging (SimpleMP) provides a solution for the two problems:\n1. Logging while using python multiprocessing.\n2. Stopping spawned processes using CTRL+C.\n\n## Install\n```bash\npip install easymp \n```\n\n## Example\n```python\nfrom easymp import parallel, addlogging, execute\n\n\n@addlogging\ndef square(x):\n    logger.info(\"Square: %d\" % x)\n    return x * x\n\n\n@addlogging\n@parallel\ndef process(x):\n    y = square(x)\n    logger.info(\"Input %d, output %d.\" % (x, y))\n    return True\n\n\nif __name__ == \"__main__\":\n    execute(process, it=range(20), nprocs=3)\n```\n",
    "bugtrack_url": null,
    "license": "0BSD",
    "summary": "Python utility for easy multiprocessing + logging.",
    "version": "0.1.8",
    "project_urls": {
        "Homepage": "https://github.com/MNayer/easymp"
    },
    "split_keywords": [
        "multiprocessing",
        "logging"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0fea3d23f4692f0670abbe6da931f709b694a1bd67d2b111b9d168df3a94b20c",
                "md5": "5bab73ea8d5b88194883265a173b0116",
                "sha256": "8df95a9d47e182c93d82469ea7db81f636c27670ae1073ca7940db9dbb191933"
            },
            "downloads": -1,
            "filename": "easymp-0.1.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5bab73ea8d5b88194883265a173b0116",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 3695,
            "upload_time": "2023-05-05T14:48:50",
            "upload_time_iso_8601": "2023-05-05T14:48:50.946444Z",
            "url": "https://files.pythonhosted.org/packages/0f/ea/3d23f4692f0670abbe6da931f709b694a1bd67d2b111b9d168df3a94b20c/easymp-0.1.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2f75be400b280d811597ada990e316760efd1106cea8a5ef7172a8ef54db9393",
                "md5": "cf46def4b23138c188db90cc8021f67a",
                "sha256": "3d8c6ad992852faeaada22289057f271ddd4f4c70725ed47b461613305b23745"
            },
            "downloads": -1,
            "filename": "easymp-0.1.8.tar.gz",
            "has_sig": false,
            "md5_digest": "cf46def4b23138c188db90cc8021f67a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3378,
            "upload_time": "2023-05-05T14:48:53",
            "upload_time_iso_8601": "2023-05-05T14:48:53.875901Z",
            "url": "https://files.pythonhosted.org/packages/2f/75/be400b280d811597ada990e316760efd1106cea8a5ef7172a8ef54db9393/easymp-0.1.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-05 14:48:53",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MNayer",
    "github_project": "easymp",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "easymp"
}
        
Elapsed time: 0.08216s