{ "info": { "author": "Ilya Konovalov", "author_email": "aragaer@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Utilities" ], "description": "# Runner [![Build Status](https://travis-ci.org/aragaer/runner.svg?branch=master)](https://travis-ci.org/aragaer/runner) [![codecov](https://codecov.io/gh/aragaer/runner/branch/master/graph/badge.svg)](https://codecov.io/gh/aragaer/runner) [![BCH compliance](https://bettercodehub.com/edge/badge/aragaer/runner?branch=master)](https://bettercodehub.com/results/aragaer/runner) [![donate using paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=aragaer@gmail.com&lc=RU&item_name=RUNNER¤cy_code=USD&bn=PP-DonationsBF:btn_donate_SM.gif:NonHosted)\n\nSimple wrapper around subprocess.Popen.\n\nMultiple commands can be configured to be executed. Each command can\nhave some predetermined parameters and additional parameters or\noverrides can be passed when application is executed. Multiple\ninstances of one application can be running using aliases.\n\nTo communicate to running processes Channel classes from\n[yet-another-io-channels-library](https://github.com/aragaer/channels)\nare used.\n\nExamples:\n\nUsing STDIO.\n\n runner = Runner()\n runner.add(\"cat\", \"cat\")\n runner.start('cat')\n channel = runner.get_channel('cat')\n channel.write(b'hello, world')\n\t# later\n\tline = channel.read() # Will return b'hello, world'\n\nUsing UNIX socket.\n\n runner = Runner()\n self._runner.add(\"socat\", \"socat SYSTEM:cat UNIX-LISTEN:socket\",\n\t type=\"socket\", socket=\"socket\")\n runner.start('socat')\n channel = runner.get_channel('socat')\n channel.write(b'hello, world')\n\t# later\n\tline = channel.read() # Will return b'hello, world'\n\n## Classes\n\n### Runner\n\n`add(self, name, command, **kwargs)`\n\nAdd the application to the list of registered applications or update\nif already added.\n\n- `name`: application name\n- `command`: the command to be executed\n\n`**kwargs` can include the following:\n\n- `type`: either `stdio` or `socket`. Default is `stdio`\n- `cwd`: working directory of the process\n- `socket`: if type is `socket`, this is the name of the UNIX socket file to connect to\n- `setpgrp`: if `True` the process is moved to a separate process group and will not receive signals sent to main process. Default is `False`\n- `buffering`: if set to `\"line\"` the channel is line-buffered for reading\n\n`update_config(self, config)`\n\nConfig must be a dictionary where each key is an alias of an\napplication and value is a dictionary of that application's\nconfiguration. `runner.add(\"app\", \"command\", **kwargs)` is equivalent\nto `runner.update_config({\"app\": {\"command\": \"command\",\n**kwargs}})`. Useful for adding multiple applications at once.\n\n`ensure_running(self, app_name, alias=None, with_args=None, **kwargs)`\n\n`start(self, app_name, alias=None, with_args=None, **kwargs)`\n\nStart the process. If the process with the same alias is already\nrunning, `start` will raise `ProcessExistsException`, while\n`ensure_running` will silently do nothing.\n\n- `app_name`: application alias, given in the configuration\n- `alias`: alias that will be given to actual started process. If `None`, application alias will be used\n- `with_args`: list of additional arguments that will be added to the command\n- `kwargs`: extend or override parameters in application config\n\n`get_channel(self, alias)`\n\nReturns the `Channel` object to communicate to the running process.\n\n`terminate(self, alias)`\n\nTerminates the process.\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/aragaer/runner", "keywords": "run command shell socket", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "yet-another-runner", "package_url": "https://pypi.org/project/yet-another-runner/", "platform": "", "project_url": "https://pypi.org/project/yet-another-runner/", "project_urls": { "Homepage": "https://github.com/aragaer/runner" }, "release_url": "https://pypi.org/project/yet-another-runner/0.5.0/", "requires_dist": [ "attrs", "yet-another-io-channels-library (>=0.2.0)" ], "requires_python": "", "summary": "Simple process runner", "version": "0.5.0" }, "last_serial": 4418361, "releases": { "0.1.1": [ { "comment_text": "", "digests": { "md5": "e7817724e465363db01e991289ab039a", "sha256": "e27d475ea5c26179a0cd59965fc20aa9cef96039238ed2742b4ad9aa2a30d961" }, "downloads": -1, "filename": "yet_another_runner-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "e7817724e465363db01e991289ab039a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2976, "upload_time": "2018-07-29T20:09:57", "url": "https://files.pythonhosted.org/packages/aa/d5/0fad61fbb6bafa7c9ac104cba3ef727c77b53617cf6fbef502fc928d3c67/yet_another_runner-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7f56c06a45e499fd50c4c675c4c025dc", "sha256": "ea7f29f460410f31d3ba7d9cee59638ece092a4f015d1f6b252c9ef3cb46463d" }, "downloads": -1, "filename": "yet-another-runner-0.1.1.tar.gz", "has_sig": false, "md5_digest": "7f56c06a45e499fd50c4c675c4c025dc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3353, "upload_time": "2018-07-29T20:09:58", "url": "https://files.pythonhosted.org/packages/8f/9b/92f37ef0b92c2d1e24e59343f556603b6ac3c6d3471c0451923699d9db16/yet-another-runner-0.1.1.tar.gz" } ], "0.1.1.1": [ { "comment_text": "", "digests": { "md5": "310134ab033161ccd4347180da19e6e8", "sha256": "3c885b2621f395a8a21bb76eb8381a69f6137e6aa3d8695a1a8e0502fff999cc" }, "downloads": -1, "filename": "yet_another_runner-0.1.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "310134ab033161ccd4347180da19e6e8", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4135, "upload_time": "2018-07-29T20:29:23", "url": "https://files.pythonhosted.org/packages/dc/99/9af78acaf93bea04cd89afe8339e8053daee36302ece1f2239c40fde765c/yet_another_runner-0.1.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e72868265ecfbced09eb4c20ae5e7d9a", "sha256": "6e77eabd97cfc604fa7672052b3e5b00b59b5e0782e7e5990e03d9d757b3d9a7" }, "downloads": -1, "filename": "yet-another-runner-0.1.1.1.tar.gz", "has_sig": false, "md5_digest": "e72868265ecfbced09eb4c20ae5e7d9a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3631, "upload_time": "2018-07-29T20:29:25", "url": "https://files.pythonhosted.org/packages/07/8d/094a4a9373a00770abb43c28033bd1c080a5d0257f98c20f0c63e7ea1766/yet-another-runner-0.1.1.1.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "b2750ace8ada035aea254c17e6b578e9", "sha256": "df1dc27d4d683c288d53be42bf2433ab7b1d57882a0c56ebe0fb628400172bd6" }, "downloads": -1, "filename": "yet_another_runner-0.2.0-py3-none-any.whl", "has_sig": false, "md5_digest": "b2750ace8ada035aea254c17e6b578e9", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4250, "upload_time": "2018-08-17T17:30:02", "url": "https://files.pythonhosted.org/packages/fe/f3/ff47f8fa04d504516234e2a2f65c733b1e35d6928be16ccc6e0205a8718f/yet_another_runner-0.2.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7404cedec170a656e393d573be3a463e", "sha256": "29d774f2e7333f1c8b89deca2a7261864c946a3550d92d2fada32369ef6c91df" }, "downloads": -1, "filename": "yet-another-runner-0.2.0.tar.gz", "has_sig": false, "md5_digest": "7404cedec170a656e393d573be3a463e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3752, "upload_time": "2018-08-17T17:30:03", "url": "https://files.pythonhosted.org/packages/ed/68/4fdac0d89894f8691265893f5bb83437f80208c824daf4dc636158e69182/yet-another-runner-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "9c92b3318ee83e621f8a5e5fc1dc793e", "sha256": "1a683d94cf8c169c3e66c81f82dba06bb0809f3be75deb89c5c350c3a402e4a1" }, "downloads": -1, "filename": "yet_another_runner-0.3.0-py3-none-any.whl", "has_sig": false, "md5_digest": "9c92b3318ee83e621f8a5e5fc1dc793e", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 4971, "upload_time": "2018-08-19T13:17:14", "url": "https://files.pythonhosted.org/packages/51/aa/0ccd21add7b8ed232deb2de5bb0f130175cafcaacfcdca56534e697ce4b1/yet_another_runner-0.3.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "b2886c788c168688d0d32929cffbf489", "sha256": "9207509bfc14b58e7c162685952794234393a742ec108f28a9f4d7da955879a5" }, "downloads": -1, "filename": "yet-another-runner-0.3.0.tar.gz", "has_sig": false, "md5_digest": "b2886c788c168688d0d32929cffbf489", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4514, "upload_time": "2018-08-19T13:17:15", "url": "https://files.pythonhosted.org/packages/d3/f1/872d30499ac6a79e461e1e4d50effb7238cd3c01678d6678e2e4e8816049/yet-another-runner-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "0ca028fcedbdbc14f6ae7b53d4886490", "sha256": "2c15d816fbd870bcd3a3462a46d18cc51f1000c9234bb4f189e697e49011d200" }, "downloads": -1, "filename": "yet_another_runner-0.3.1-py3-none-any.whl", "has_sig": false, "md5_digest": "0ca028fcedbdbc14f6ae7b53d4886490", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5883, "upload_time": "2018-09-13T20:03:53", "url": "https://files.pythonhosted.org/packages/bf/73/a9657424fdf75b5f56ce8de15a59c5472c0fe2f532cd8ddfce7ad73373e0/yet_another_runner-0.3.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a5d6c13630d2a47ee97b9d63a9cb7209", "sha256": "7f128d98e8e9d0e34d345f78cb3a61b32e71d8d84e52095e72a692cb083c2cba" }, "downloads": -1, "filename": "yet-another-runner-0.3.1.tar.gz", "has_sig": false, "md5_digest": "a5d6c13630d2a47ee97b9d63a9cb7209", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5195, "upload_time": "2018-09-13T20:03:54", "url": "https://files.pythonhosted.org/packages/dc/87/5a6a7faa16e4db12c188793b776b4857d3cab080ec6caf237c2cd5fb4c32/yet-another-runner-0.3.1.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "f1b86d7a046ba99ba9c3a531fdec5a07", "sha256": "85a023916284be2a7947a6ef46371213716bf0bd0edef5796e1156009d4743d9" }, "downloads": -1, "filename": "yet_another_runner-0.4.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f1b86d7a046ba99ba9c3a531fdec5a07", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5408, "upload_time": "2018-10-14T19:04:04", "url": "https://files.pythonhosted.org/packages/ee/c8/15f93da7d2a64080352ec794fe5e6b00257b8bca3aaffea2bac05023db88/yet_another_runner-0.4.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "54206f7d0bd10007f1cc5028a09f4044", "sha256": "7fcbc446ee89b4ed80d99c7dde6621adf6dbfa61c5d4d2d9bfccb1473442f338" }, "downloads": -1, "filename": "yet-another-runner-0.4.0.tar.gz", "has_sig": false, "md5_digest": "54206f7d0bd10007f1cc5028a09f4044", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3767, "upload_time": "2018-10-14T19:04:05", "url": "https://files.pythonhosted.org/packages/c9/7f/c7d7ba1fe60d59a79700db850920f6100d7abe8307b78fe74615474163a8/yet-another-runner-0.4.0.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "7857bc4b043135737fa2bdd25dff4652", "sha256": "3ef4e61eed1a9a768a99aa42da59a57cb965a7217077644df6a0d6205d3b9350" }, "downloads": -1, "filename": "yet_another_runner-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "7857bc4b043135737fa2bdd25dff4652", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5418, "upload_time": "2018-10-26T08:28:00", "url": "https://files.pythonhosted.org/packages/93/28/725d201d5bb1ed2238f7f79cc7c220b718f2283d2316186ce233702ac508/yet_another_runner-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f4eb01ca67bd53b202587542ded323e0", "sha256": "95ded5f05ca2caacc011bbcc07e68847504435910e3c5c2f7aec0b910ac84446" }, "downloads": -1, "filename": "yet-another-runner-0.5.0.tar.gz", "has_sig": false, "md5_digest": "f4eb01ca67bd53b202587542ded323e0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4070, "upload_time": "2018-10-26T08:28:02", "url": "https://files.pythonhosted.org/packages/99/b8/6b6aa056324661c62f5d80e478784b36f764d2f2aa9cdc0bd5d54a6e7a43/yet-another-runner-0.5.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "7857bc4b043135737fa2bdd25dff4652", "sha256": "3ef4e61eed1a9a768a99aa42da59a57cb965a7217077644df6a0d6205d3b9350" }, "downloads": -1, "filename": "yet_another_runner-0.5.0-py3-none-any.whl", "has_sig": false, "md5_digest": "7857bc4b043135737fa2bdd25dff4652", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 5418, "upload_time": "2018-10-26T08:28:00", "url": "https://files.pythonhosted.org/packages/93/28/725d201d5bb1ed2238f7f79cc7c220b718f2283d2316186ce233702ac508/yet_another_runner-0.5.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "f4eb01ca67bd53b202587542ded323e0", "sha256": "95ded5f05ca2caacc011bbcc07e68847504435910e3c5c2f7aec0b910ac84446" }, "downloads": -1, "filename": "yet-another-runner-0.5.0.tar.gz", "has_sig": false, "md5_digest": "f4eb01ca67bd53b202587542ded323e0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4070, "upload_time": "2018-10-26T08:28:02", "url": "https://files.pythonhosted.org/packages/99/b8/6b6aa056324661c62f5d80e478784b36f764d2f2aa9cdc0bd5d54a6e7a43/yet-another-runner-0.5.0.tar.gz" } ] }