{ "info": { "author": "Bruno Costa, Kairo Araujo", "author_email": "coder@marreta.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: Unix", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: System :: Shells" ], "description": "pyrcmd\n######\n\nPython Remote Commands\n\n\n.. image:: https://travis-ci.org/marreta-sources/pyrcmd.svg?branch=master\n :target: https://travis-ci.org/marreta-sources/pyrcmd\n\n:PyStorage: Python Remote Commands toolkit\n:Copyright: Copyright (c) 2016 Bruno Costa, Kairo Araujo \n:License: BSD\n:Development: https://github.com/marreta-sources/pyrcmd\n\n.. contents::\n :local:\n :depth: 2\n :backlinks: none\n\n\n\nInstalling\n==========\n\nUsing PIP\n-----------------------------\n\nJust run the PIP\n\n.. code-block:: bash\n\n $ sudo pip install pyrcmd\n\nFrom local\n----------\n\nDownload the pyrcmd from PIP or from Marreta Github\nhttp://github.com/marreta-sources/pyrcmd/ and uncompress\n\n.. code-block:: bash\n\n $ python setup.py install\n\n\nUsing\n=====\n\nAt the moment the pyrcmd supports commands over SSH.\n\nSSH support\n-----------\n\n* Attributes:\n\n :Address: IP or Hostname to client server\n :User: User used to connect using ssh\n :Passwd: Password used to connect to ssh\n :timeout: Timeout to Connect (Hostname is valid and has route to host), default value for timeout is 30\n\n* Return:\n\n :returns: Dictionary (Array) with Return Code, Std output and Std Error\n\n* Exceptions:\n\n :AuthFailure: Client to Server Problem with Authentication\n :BadHostKey: Host Key does not match\n :SshProtocol: Problem of SSH2 Negotiation\n :TimeOut: Timeout while trying to connect to a valid address\n :TimeoutExecuting: Timeout while trying to execute command.\n\n\n* Sample:\n\nSimple use:\n\n>>> import pyrcmd\n>>> remote = pyrcmd.SSH('192.168.0.1', 'foobar', 'Password1')\n>>> remote_out = remote.execute('ls')\n>>> print remote_out\n{'return_code': 0, 'stderr': '', 'stdout': 'total 24\\ndrwx------ 3 kairo users 512 Jan 30 11:31 .\\ndrwx------ 10 kairo users 512 Jan 30 11:30 ..\\n-rw------- 1 kairo users 0 Jan 30 11:30 foobar.txt\\ndrwx------ 2 kairo users 512 Jan 30 11:31 marretinha\\n'}\n>>> print remote_out['return_code']\n0\n>>> print remote_out['stdout']\ntotal 24\ndrwx------ 3 kairo users 512 Jan 30 11:31 .\ndrwx------ 10 kairo users 512 Jan 30 11:30 ..\n-rw------- 1 kairo users 0 Jan 30 11:30 foobar.txt\ndrwx------ 2 kairo users 512 Jan 30 11:31 marretinha\n\n\nWorking with exceptions\n\n>>> server = pyrcmd.SSH('192.168.0.1', 'foobar', 'i dont remember', timeout=10)\n>>> try:\n... server.execute('whoami')\n... except ValueError, exception_error:\n... print exception_error\n...\nAuthFailure\n\n\nContributing\n============\n\n1. Make the for from https://github.com/marreta-sources/pyrcmd\n\n2. Change the code\n\n3. Test the code\n 1. First check all the PEP8 recommendations and possible spells.\n\n 2. Run tests with tox\n\n 3. Create a http://travis-ci.com for your fork and verify the tests\n\n4. Submit your code doing a pull request\n 1. try to give us details about the code. We are newbies with Python and it\n will be help us.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/marreta/pyrcmd/", "keywords": "Python Remote Command Commands SSH Toolkit", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "pyrcmd", "package_url": "https://pypi.org/project/pyrcmd/", "platform": "Posix; MacOS X; Windows", "project_url": "https://pypi.org/project/pyrcmd/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/marreta/pyrcmd/" }, "release_url": "https://pypi.org/project/pyrcmd/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Python Remote Commands toolkit", "version": "0.1.1" }, "last_serial": 1964370, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "50a0228dcf032dfb65bafff8bd9a7030", "sha256": "900fbb105d72eead101312368e63a30b8ddd2655675d5bcf095ee5caab4df534" }, "downloads": -1, "filename": "pyrcmd-0.0.1.tar.gz", "has_sig": false, "md5_digest": "50a0228dcf032dfb65bafff8bd9a7030", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5134, "upload_time": "2016-02-05T18:18:05", "url": "https://files.pythonhosted.org/packages/88/6b/7d0b730498c7274429fe8becf52f102e87010e53b2c602d0108c31fcd75b/pyrcmd-0.0.1.tar.gz" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "d2b3690915caccb3e62a4fbac3af4fe9", "sha256": "710c802a8a100e1f00e3717e8b70ce87ded8983d9355bbbba884816ec42d5786" }, "downloads": -1, "filename": "pyrcmd-0.1.0.tar.gz", "has_sig": false, "md5_digest": "d2b3690915caccb3e62a4fbac3af4fe9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5134, "upload_time": "2016-02-06T10:44:01", "url": "https://files.pythonhosted.org/packages/23/ec/e46a5862c983355181a020f20c4b460e18e8e76186400f963571bb9cd20e/pyrcmd-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "54301e27abf562b5014db3e7b1a579e4", "sha256": "88e5d50efd60e027ca6378b334c2de46aacbb6835f59e10975117c2ffd39554f" }, "downloads": -1, "filename": "pyrcmd-0.1.1.tar.gz", "has_sig": false, "md5_digest": "54301e27abf562b5014db3e7b1a579e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5210, "upload_time": "2016-02-19T00:33:45", "url": "https://files.pythonhosted.org/packages/02/fc/770ef5c72e2e118347049964827510e1c5820cd4fd5e1f310917d2d377bc/pyrcmd-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "54301e27abf562b5014db3e7b1a579e4", "sha256": "88e5d50efd60e027ca6378b334c2de46aacbb6835f59e10975117c2ffd39554f" }, "downloads": -1, "filename": "pyrcmd-0.1.1.tar.gz", "has_sig": false, "md5_digest": "54301e27abf562b5014db3e7b1a579e4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5210, "upload_time": "2016-02-19T00:33:45", "url": "https://files.pythonhosted.org/packages/02/fc/770ef5c72e2e118347049964827510e1c5820cd4fd5e1f310917d2d377bc/pyrcmd-0.1.1.tar.gz" } ] }