{ "info": { "author": "Jeff Leary", "author_email": "sillymonkeysoftware@gmail.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3" ], "description": "Remote Runner\n=============\nTransfer a local script file to a remote host and execute it.\n\n\nRequirements\n============\n- Python 2.7 and Python 3 are supported.\n- Paramiko 1.10+.\n\n\nInstall\n=======\n::\n\n pip install remrunner\n\n\nSynopsis\n========\n::\n\n from remrunner import runner\n r = runner.Runner(host, username)\n \n rval, stdout, stderr = r.run('/path/to/local/script.py')\n if rval:\n print(stderr)\n else:\n print(stdout)\n \n r.close()\n \n\nUses\n====\n- Great when using scripts to collect information from a large number of remote hosts. \n- No need to maintain scripts across multiple systems. Only the script versions on the local host need to be maintained.\n \n\nDetails\n=======\nNamed files are copied to a temp location (./.remrunner/[PID]/) on the remote \nhost, permissions are set to 0700, and script is then executed.\n\nOn cleanup, the [PID] directory and all contents are removed before closing\nthe connections.\n\n \nAPI\n===\n\nClass Runner\n------------\n\ninit(host, user, kwargs)\n *host* : Required. IP Address or FQDN\n \n *user* : Optional. Defaults to current running user on local machine.\n \n keyword-args:\n *auto_add* : (Boolean) Defaults to True. Set Paramiko Client.AutoAddPolicy.\n \n \nrun(script, sudo, timeout, opts)\n Run the named local script on remote host.\n \n *script* : Path to script on local machine\n \n *sudo* : (Boolean) Defaults to False. When true, the execution command on \n remote machine will be prefaced with \"sudo \"\n \n *timeout* : (seconds, optional) Defaults to 10\n \n *opts* : optional command-line arguments that will be passed to remote script.\n \n\nclose() \n Clean up temporary directories on remote host and close SSH and SFTP sessions.\n \n \nExamples\n========\n\n- Run remote script with sudo::\n\n r.run(script, True)\n \n- Run remote script and specify a 60 second timeout::\n\n r.run(script, False, 60)\n \n- Run remote script with timeout and optional arguments::\n\n r.run(script, False, 15, \"--verbose --interval=4\")\n\n\nKnown Issues\n============\nCurrently, as this is intended to be used for automation, *remrunner* assumes \nthat SSH keys to allow password-less logins are already in place. \nThere is no option to prompt for password or ssh passphrase. \nMaybe in a future release.\n\n\nTo Do\n=====\nCould use better exception handling in a few places.\nNeeds a tests.\nProbably needs sanitizing/de-tainting of optional user arguments.\n\n \nAuthor\n======\nJeff Leary (sillymonkeysoftware -at- gmail -dot- com)", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/jeffleary00/remrunner/tarball/0.5", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jeffleary00/remrunner", "keywords": "automation,ssh,command,paramiko", "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "remrunner", "package_url": "https://pypi.org/project/remrunner/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/remrunner/", "project_urls": { "Download": "https://github.com/jeffleary00/remrunner/tarball/0.5", "Homepage": "https://github.com/jeffleary00/remrunner" }, "release_url": "https://pypi.org/project/remrunner/0.5/", "requires_dist": null, "requires_python": null, "summary": "Transfer a local script file to a remote host and execute it.", "version": "0.5" }, "last_serial": 2553692, "releases": { "0.3": [ { "comment_text": "", "digests": { "md5": "5b6a56a4cf8ccf90bdaccd66e6e7f608", "sha256": "e62a75e3297cf14ac5a892592017903d81c394d50c91995ccadc89a7f7729f93" }, "downloads": -1, "filename": "remrunner-0.3.tar.gz", "has_sig": false, "md5_digest": "5b6a56a4cf8ccf90bdaccd66e6e7f608", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2968, "upload_time": "2016-12-12T21:32:30", "url": "https://files.pythonhosted.org/packages/5a/b3/f4d254797b4eb05bf04b36109197a2acaf90f626e1a62ac7242778fe414b/remrunner-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "9cea8fa26ffa5b4e40f4a8ace1397ba8", "sha256": "f0098853a1e23bd0c6df2adc61a769702e43bc2805a952e9700f50058ce7611e" }, "downloads": -1, "filename": "remrunner-0.4.tar.gz", "has_sig": false, "md5_digest": "9cea8fa26ffa5b4e40f4a8ace1397ba8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3971, "upload_time": "2016-12-15T02:22:26", "url": "https://files.pythonhosted.org/packages/fb/f4/8e6458af795af7b3b4d813c172713aecc755cc387ee9b3651c0e90b7363a/remrunner-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "44e6e617858d503836b5f553ca937aeb", "sha256": "5e21129d92ce2d07e642b35aa550ae3143c83aae26471f8a367d532075af7b16" }, "downloads": -1, "filename": "remrunner-0.5.tar.gz", "has_sig": false, "md5_digest": "44e6e617858d503836b5f553ca937aeb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3945, "upload_time": "2017-01-04T14:27:03", "url": "https://files.pythonhosted.org/packages/b8/da/24ef49bb1ac63a94a2218e72280f04ac92528f9a7c805a0cdc5b4557a5d0/remrunner-0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "44e6e617858d503836b5f553ca937aeb", "sha256": "5e21129d92ce2d07e642b35aa550ae3143c83aae26471f8a367d532075af7b16" }, "downloads": -1, "filename": "remrunner-0.5.tar.gz", "has_sig": false, "md5_digest": "44e6e617858d503836b5f553ca937aeb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3945, "upload_time": "2017-01-04T14:27:03", "url": "https://files.pythonhosted.org/packages/b8/da/24ef49bb1ac63a94a2218e72280f04ac92528f9a7c805a0cdc5b4557a5d0/remrunner-0.5.tar.gz" } ] }