{ "info": { "author": "Corentin Dancette", "author_email": "contact@cdancette.fr", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "\n# pyrunner\n\nA simple Python task runner. Use it as a CLI, or wrap your own scripts with \nthe python interface.\n\nFeatures\n- Prevent a task to be running twice simultaneously.\n- Prevent a task to be launched again when it is already completed.\n\nIt implements this by writing token files `.done` and `.running` in a \nspecified task directory. One directory = One task.\n\n### Example use cases\n##### Crash recovery\n\nSay you launched multiple tasks for all subdirectories: `ls | xargs -I % command %`, \nand the command crashes in the middle. Now how do you run only the unfinished tasks ?\n\nYou can use pyrunner to run the your tasks, and then the second run will only start \nunfinished tasks.\n\n##### Parallel\nIt can also be used as a poor man's parallel library.\nInstead of `ls | xargs -P 2 -I % command %` you can run `ls | xargs -I % pyrunner %/.tokens command %` in two shells.\nEach shell will pick up the pending tasks.\n\n## Installation\n\n`pip install pyrunner`\n\n## CLI usage\n\nYou can use it as a cli, like this : \n\n```bash\npyrunner \n```\n\nFor example\n\n```bash\npyrunner .tokens/ touch file.txt\n```\n\nWill create a file called file.txt.\n\nAnother example : \n\n```bash\npyrunner .tokens/ bash -c \"date > date.txt\"\n```\nThis command will save the current date in the file `date.txt`. \nIf you run it again it will not run.\n\n## Python Usage\n\nYou can also wrap your script in a python class.\nThe advantage is that you can define your own arguments, and use them to define the tokens folder. (and avoid duplicating it as an argument like with the `pyrunner` cli).\n\nFor this, you need to wrap your script in a python class.\n\nA basic task that creates a file\n\n```python\nfrom pyrunner import Task\n\nclass TouchTask(Task):\n\n def command(self):\n return \"touch\"\n\n def experiment_folder(self, args):\n return \".\" # return current folder\n\nif __name__ == \"__main__\":\n TouchTask().run()\n```\n\nMore complex examples are in the examples/ directory.\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/cdancette/pyrunner", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "pyrunner", "package_url": "https://pypi.org/project/pyrunner/", "platform": "", "project_url": "https://pypi.org/project/pyrunner/", "project_urls": { "Homepage": "https://github.com/cdancette/pyrunner" }, "release_url": "https://pypi.org/project/pyrunner/0.1.4/", "requires_dist": null, "requires_python": ">=3.6.0", "summary": "Wrap your scripts around a cli.", "version": "0.1.4" }, "last_serial": 3929091, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "b13978eec1fac9eecf7021126b795707", "sha256": "60a902eff835a4bb9656a32e1257e6a3dfc3aad6130198bfe7504165cf2f4fea" }, "downloads": -1, "filename": "pyrunner-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b13978eec1fac9eecf7021126b795707", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6.0", "size": 3425, "upload_time": "2018-06-03T19:42:31", "url": "https://files.pythonhosted.org/packages/62/f6/b2ee5a98605dca944ff6d8b6c953124651439039c6170a343991b6d11e82/pyrunner-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "98f7fb0018f04507d000475c9e223990", "sha256": "7ce6f1eb83f774c1e3afb4d01879779cf990e866814845d0d3356f3236b5bb96" }, "downloads": -1, "filename": "pyrunner-0.1.tar.gz", "has_sig": false, "md5_digest": "98f7fb0018f04507d000475c9e223990", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 2897, "upload_time": "2018-06-03T19:42:32", "url": "https://files.pythonhosted.org/packages/94/89/ad6c914fd7da4036a216ce4c121a8af39a4e9893a393c423f85064af7a85/pyrunner-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "7ad2a57d3681cde5a3897fe2bed80e6c", "sha256": "70357618c2f18d3a1aa988b40f4bbb5dbf340b53b691fa7f17f97307e0ed96dd" }, "downloads": -1, "filename": "pyrunner-0.1.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "7ad2a57d3681cde5a3897fe2bed80e6c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6.0", "size": 3458, "upload_time": "2018-06-04T12:36:15", "url": "https://files.pythonhosted.org/packages/cb/3a/ad5a4466a62ea1326b302fa424913051bfbea45ac122c6b655b40a49e38a/pyrunner-0.1.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5688a779d79988c14586c8d703ccb0fa", "sha256": "5f502f47bce504c49a1c3a485bf8a20f48c5d7dc68e0c36068e436a885c935c3" }, "downloads": -1, "filename": "pyrunner-0.1.1.tar.gz", "has_sig": false, "md5_digest": "5688a779d79988c14586c8d703ccb0fa", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 2932, "upload_time": "2018-06-04T12:36:16", "url": "https://files.pythonhosted.org/packages/70/b4/2f860b4438ecf19b8959518c3fea485f5264b9d48fd32d0f373b5665ffa8/pyrunner-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "b4c02be4009b94851c1d10ac2634d7c4", "sha256": "b7a01a229bf75bd18fdfed432fed30ba80dd68b88cc9ba6ca5484ea87a3833d4" }, "downloads": -1, "filename": "pyrunner-0.1.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b4c02be4009b94851c1d10ac2634d7c4", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6.0", "size": 2001, "upload_time": "2018-06-04T12:38:30", "url": "https://files.pythonhosted.org/packages/2a/e3/d576d83296ef547cc66eb217b6a5f3dfde5982730a47ccdbca1327ea07e8/pyrunner-0.1.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "812c47ee3627822d0e8d1ca71a343744", "sha256": "cb603339455e1977dcab0f6abeca8170169a903633227436a6230b4349c4a8ae" }, "downloads": -1, "filename": "pyrunner-0.1.2.tar.gz", "has_sig": false, "md5_digest": "812c47ee3627822d0e8d1ca71a343744", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 2929, "upload_time": "2018-06-04T12:38:31", "url": "https://files.pythonhosted.org/packages/b9/00/8208920526e420d9878b27f8fa434cbb5b271a7ebcf57e221c5439ecc689/pyrunner-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "245d2e9fa499eed4a818e272c7691578", "sha256": "168023d2718a5e65fb771da386bd0bc3aa4555916add2b4662ce3796cbe71a26" }, "downloads": -1, "filename": "pyrunner-0.1.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "245d2e9fa499eed4a818e272c7691578", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6.0", "size": 3459, "upload_time": "2018-06-04T15:24:47", "url": "https://files.pythonhosted.org/packages/13/bf/f120923849f64411cfa4787118f9b9ead605229bf967a44846c01f513c63/pyrunner-0.1.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3f0ea95d1124e48fb55402949b6fea0c", "sha256": "7c2cfe83f01a5ab22a9d3b2f6bb6897f761b9e10785c280dc88f5b113509bc19" }, "downloads": -1, "filename": "pyrunner-0.1.3.tar.gz", "has_sig": false, "md5_digest": "3f0ea95d1124e48fb55402949b6fea0c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 4214, "upload_time": "2018-06-04T15:24:48", "url": "https://files.pythonhosted.org/packages/d3/5a/11acff6ddd8157b262691ea69d7ae7836865b511ea6e420e3564e242da88/pyrunner-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "b292552b142e3e65879bff19c9053c87", "sha256": "5de1c5552767c5e240cc93e67b22855b8b368dfeca724d0f472f80cfa198face" }, "downloads": -1, "filename": "pyrunner-0.1.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b292552b142e3e65879bff19c9053c87", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6.0", "size": 3489, "upload_time": "2018-06-04T15:39:15", "url": "https://files.pythonhosted.org/packages/bc/aa/9f2f98ef1afc994341cb216b29ee3c406be054b76a883efaeadc9ed9bf63/pyrunner-0.1.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cbf4fe51a667003224a2842df8a375e6", "sha256": "2f00ab841465bb394c5a2eed8e16b4d2075ea5aabfd6143aaafa6802690541c4" }, "downloads": -1, "filename": "pyrunner-0.1.4.tar.gz", "has_sig": false, "md5_digest": "cbf4fe51a667003224a2842df8a375e6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 4240, "upload_time": "2018-06-04T15:39:16", "url": "https://files.pythonhosted.org/packages/81/7b/dd7f13c4bc3dc3720f048c6afdd9459ebaf8502cee9ca7a13687e986f80f/pyrunner-0.1.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b292552b142e3e65879bff19c9053c87", "sha256": "5de1c5552767c5e240cc93e67b22855b8b368dfeca724d0f472f80cfa198face" }, "downloads": -1, "filename": "pyrunner-0.1.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b292552b142e3e65879bff19c9053c87", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.6.0", "size": 3489, "upload_time": "2018-06-04T15:39:15", "url": "https://files.pythonhosted.org/packages/bc/aa/9f2f98ef1afc994341cb216b29ee3c406be054b76a883efaeadc9ed9bf63/pyrunner-0.1.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "cbf4fe51a667003224a2842df8a375e6", "sha256": "2f00ab841465bb394c5a2eed8e16b4d2075ea5aabfd6143aaafa6802690541c4" }, "downloads": -1, "filename": "pyrunner-0.1.4.tar.gz", "has_sig": false, "md5_digest": "cbf4fe51a667003224a2842df8a375e6", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.6.0", "size": 4240, "upload_time": "2018-06-04T15:39:16", "url": "https://files.pythonhosted.org/packages/81/7b/dd7f13c4bc3dc3720f048c6afdd9459ebaf8502cee9ca7a13687e986f80f/pyrunner-0.1.4.tar.gz" } ] }