{ "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 :: 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": "pyrcmd3\n#######\n\nPython3 Remote Commands\n\n\n.. image:: https://travis-ci.org/marreta-sources/pyrcmd3.svg?branch=master\n :target: https://travis-ci.org/marreta-sources/pyrcmd3\n\n:PyStorage: Python3 Remote Commands toolkit\n:Copyright: Copyright (c) 2016 Bruno Costa, Kairo Araujo \n:License: BSD\n:Development: https://github.com/marreta-sources/pyrcmd3\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 pyrcmd3\n\nFrom local\n----------\n\nDownload the pyrcmd3 from PIP or from Marreta Github\nhttp://github.com/marreta-sources/pyrcmd3/ and uncompress\n\n.. code-block:: bash\n\n $ python setup.py install\n\n\nUsing\n=====\n\nAt the moment the pyrcmd3 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\n Simple use:\n\n >>> import pyrcmd3\n >>> remote = pyrcmd3.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']\n 0\n >>> print remote_out['stdout']\n total 24\n drwx------ 3 kairo users 512 Jan 30 11:31 .\n drwx------ 10 kairo users 512 Jan 30 11:30 ..\n -rw------- 1 kairo users 0 Jan 30 11:30 foobar.txt\n drwx------ 2 kairo users 512 Jan 30 11:31 marretinha\n\n\n Working with exceptions\n\n >>> import pyrcmd3\n >>> server=pyrcmd3.SSH('localhost', 'foo', 'i dont remember', timeout=10)\n >>> try:\n ... server.execute('ls')\n ... except pyrcmd3.exceptions.TimeoutExecutingException as e:\n ... print(e)\n ...\n Timeout while trying to execute command.\n\nContributing\n============\n\n1. Make the for from https://github.com/marreta-sources/pyrcmd3\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/pyrcmd3/", "keywords": "Python3 Remote Command Commands SSH Toolkit", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "pyrcmd3", "package_url": "https://pypi.org/project/pyrcmd3/", "platform": "Posix; MacOS X; Windows", "project_url": "https://pypi.org/project/pyrcmd3/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/marreta/pyrcmd3/" }, "release_url": "https://pypi.org/project/pyrcmd3/0.1.0/", "requires_dist": null, "requires_python": null, "summary": "Python3 Remote Commands toolkit", "version": "0.1.0" }, "last_serial": 1988485, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "173c25cf0bb483932a98ba0be47839b4", "sha256": "e21e8b9765e3472a64c8d2832a8066484bc367163a35063ce41ee0a52ca517d3" }, "downloads": -1, "filename": "pyrcmd3-0.1.0.tar.gz", "has_sig": false, "md5_digest": "173c25cf0bb483932a98ba0be47839b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4925, "upload_time": "2016-03-03T23:21:03", "url": "https://files.pythonhosted.org/packages/ce/61/9b3bc459812d5b0002e96f005d69596416e60c3a6539c698a91e9c3a8fdc/pyrcmd3-0.1.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "173c25cf0bb483932a98ba0be47839b4", "sha256": "e21e8b9765e3472a64c8d2832a8066484bc367163a35063ce41ee0a52ca517d3" }, "downloads": -1, "filename": "pyrcmd3-0.1.0.tar.gz", "has_sig": false, "md5_digest": "173c25cf0bb483932a98ba0be47839b4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4925, "upload_time": "2016-03-03T23:21:03", "url": "https://files.pythonhosted.org/packages/ce/61/9b3bc459812d5b0002e96f005d69596416e60c3a6539c698a91e9c3a8fdc/pyrcmd3-0.1.0.tar.gz" } ] }