{ "info": { "author": "Julien Chaumont", "author_email": "pystassh@julienc.io", "bugtrack_url": null, "classifiers": [], "description": "|Build Status| |Coverage Status| |Documentation|\n\npystassh\n========\n\nAn easy to use libssh wrapper to execute commands on a remote server via SSH with Python.\n\n- Author: Julien CHAUMONT (https://julienc.io)\n- Version: 1.0.1\n- Date: 2016-08-02\n- Licence: MIT\n- Url: https://julienc91.github.io/pystassh/\n\nInstallation\n------------\n\nJust use ``pip`` to install the package:\n\n.. code-block :: shell\n\n pip install pystassh\n\n``pystassh`` is working with python 3+ and pypy.\n\nRequirements\n------------\n\n``pystassh`` is using libssh to work, you will have to install the library before using\n``pystassh``. Only version 0.7.3 was used during the development, but versions 0.5 and above should work fine as well with ``pystassh``.\nVisit `libssh's official website `_ for more information.\n``libffi-dev`` is also required by the ``cffi`` module.\n\nOn Debian and Ubuntu:\n\n.. code-block :: shell\n\n apt-get install libssh-4 libffi-dev\n\nOn Fedora:\n\n.. code-block :: shell\n\n dnf install libssh libffi-dev\n\nExamples\n--------\n\nRunning simple commands:\n\n.. code-block :: python\n\n >>> from pystassh import Session\n >>> with Session('remote_host.org', username='foo', password='baz') as ssh_session:\n ... res = ssh_session.execute('whoami')\n >>> res.stdout\n 'foo'\n\nHandling errors:\n\n.. code-block :: python\n\n >>> from pystassh import Session\n >>> with Session('remote_host.org', username='foo', password='baz') as ssh_session:\n ... res = ssh_session.execute('whoam')\n >>> res.stderr\n 'bash: whoam : command not found'\n\nRunning multiple commands:\n\n.. code-block :: python\n\n >>> from pystassh import Session\n >>> with Session('remote_host.org', username='foo', password='baz') as ssh_session:\n ... ssh_session.execute('echo \"bar\" > /tmp/foo')\n ... res = ssh_session.execute('cat /tmp/foo')\n >>> res.stdout\n 'bar'\n\nUse a session without a ``with`` block:\n\n.. code-block :: python\n\n >>> from pystassh import Session\n >>> ssh_session = Session('remote_host.org', username='foo', password='baz')\n >>> ssh_session.connect()\n >>> res = ssh_session.execute('whoami')\n >>> res.stdout\n 'foo'\n >>> ssh_session.disconnect()\n\n\nDocumentation\n-------------\n\nThe complete documentation is available at: http://pystassh.readthedocs.org/en/latest/\n\n\n.. |Build Status| image:: https://travis-ci.org/julienc91/pystassh.png\n :target: https://travis-ci.org/julienc91/pystassh\n.. |Coverage Status| image:: https://coveralls.io/repos/github/julienc91/pystassh/badge.svg?branch=master\n :target: https://coveralls.io/github/julienc91/pystassh?branch=master\n.. |Documentation| image:: https://readthedocs.org/projects/pystassh/badge/?version=latest\n :target: http://pystassh.readthedocs.org/en/latest/\n", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://julienc91.github.io/pystassh/", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "pystassh", "package_url": "https://pypi.org/project/pystassh/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pystassh/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://julienc91.github.io/pystassh/" }, "release_url": "https://pypi.org/project/pystassh/1.0.1/", "requires_dist": null, "requires_python": null, "summary": "An easy to use libssh wrapper to execute commands on a remote server via SSH with Python", "version": "1.0.1" }, "last_serial": 2258540, "releases": { "1.0": [ { "comment_text": "", "digests": { "md5": "b15fd4f1de81f4df6c9d1d1dc76120a0", "sha256": "307f94f2e3341b9e247ac02257729abad3b4c5a1914cbf2e858538c177ae6fb0" }, "downloads": -1, "filename": "pystassh-1.0.tar.gz", "has_sig": false, "md5_digest": "b15fd4f1de81f4df6c9d1d1dc76120a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6709, "upload_time": "2016-08-01T19:34:43", "url": "https://files.pythonhosted.org/packages/98/74/f4fdde758e1d074efc67f183288eb6788d934db0562e068d33e94129bf6e/pystassh-1.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "9ed9408fc75247403b7484fe8a5cf008", "sha256": "8b73876e951688d5334759aa561a579178ae51f14c0fd8b3f4eab12c83b278a3" }, "downloads": -1, "filename": "pystassh-1.0.1.tar.gz", "has_sig": false, "md5_digest": "9ed9408fc75247403b7484fe8a5cf008", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6796, "upload_time": "2016-08-02T19:27:27", "url": "https://files.pythonhosted.org/packages/98/58/2dc7d7c307035d9b65e645f2c496592e909c22c94127dbbfe74ca49533a8/pystassh-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9ed9408fc75247403b7484fe8a5cf008", "sha256": "8b73876e951688d5334759aa561a579178ae51f14c0fd8b3f4eab12c83b278a3" }, "downloads": -1, "filename": "pystassh-1.0.1.tar.gz", "has_sig": false, "md5_digest": "9ed9408fc75247403b7484fe8a5cf008", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6796, "upload_time": "2016-08-02T19:27:27", "url": "https://files.pythonhosted.org/packages/98/58/2dc7d7c307035d9b65e645f2c496592e909c22c94127dbbfe74ca49533a8/pystassh-1.0.1.tar.gz" } ] }