Metadata-Version: 2.0
Name: fs.sshfs
Version: 0.3.0
Summary: Pyfilesystem2 implementation for SSH/SFTP using paramiko
Home-page: https://github.com/althonos/fs.sshfs
Author: Martin Larralde
Author-email: martin.larralde@ens-cachan.fr
License: LGPL-2.1+
Keywords: filesystem,Pyfilesystem2,ssh,sftp,paramiko
Platform: any
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Topic :: Internet
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Filesystems
Requires-Python: >= 2.7, != 3.0.*, != 3.1.*, != 3.2.*
Requires-Dist: fs (>=2.0.6)
Requires-Dist: paramiko
Requires-Dist: six

fs.sshfs
========

|Source| |PyPI| |Travis| |Codecov| |Codacy| |Format| |License|

.. |Codacy| image:: https://img.shields.io/codacy/grade/9734bea6ec004cc4914a377d9e9f54bd/master.svg?style=flat-square&maxAge=300
   :target: https://www.codacy.com/app/althonos/fs.sshfs/dashboard

.. |Travis| image:: https://img.shields.io/travis/althonos/fs.sshfs/master.svg?style=flat-square&maxAge=300
   :target: https://travis-ci.org/althonos/fs.sshfs/branches

.. |Codecov| image:: https://img.shields.io/codecov/c/github/althonos/fs.sshfs/master.svg?style=flat-square&maxAge=300
   :target: https://codecov.io/gh/althonos/fs.sshfs

.. |PyPI| image:: https://img.shields.io/pypi/v/fs.sshfs.svg?style=flat-square&maxAge=300
   :target: https://pypi.python.org/pypi/fs.sshfs

.. |Format| image:: https://img.shields.io/pypi/format/fs.sshfs.svg?style=flat-square&maxAge=300
   :target: https://pypi.python.org/pypi/fs.sshfs

.. |Versions| image:: https://img.shields.io/pypi/pyversions/fs.sshfs.svg?style=flat-square&maxAge=300
   :target: https://travis-ci.org/althonos/fs.sshfs

.. |License| image:: https://img.shields.io/pypi/l/fs.sshfs.svg?style=flat-square&maxAge=300
   :target: https://choosealicense.com/licenses/lgpl-2.1/

.. |Source| image:: https://img.shields.io/badge/source-GitHub-303030.svg?maxAge=300&style=flat-square
   :target: https://github.com/althonos/fs.sshfs


Requirements
------------

+-------------------+-----------------+-------------------+--------------------+
| **pyfilesystem2** | |PyPI fs|       | |Source fs|       | |License fs|       |
+-------------------+-----------------+-------------------+--------------------+
| **six**           | |PyPI six|      | |Source six|      | |License six|      |
+-------------------+-----------------+-------------------+--------------------+
| **paramiko**      | |PyPI paramiko| | |Source paramiko| | |License paramiko| |
+-------------------+-----------------+-------------------+--------------------+


.. |License six| image:: https://img.shields.io/pypi/l/six.svg?maxAge=300&style=flat-square
   :target: https://choosealicense.com/licenses/mit/

.. |Source six| image:: https://img.shields.io/badge/source-GitHub-303030.svg?maxAge=300&style=flat-square
   :target: https://github.com/benjaminp/six

.. |PyPI six| image:: https://img.shields.io/pypi/v/six.svg?maxAge=300&style=flat-square
   :target: https://pypi.python.org/pypi/six

.. |License fs| image:: https://img.shields.io/badge/license-MIT-blue.svg?maxAge=300&style=flat-square
   :target: https://choosealicense.com/licenses/mit/

.. |Source fs| image:: https://img.shields.io/badge/source-GitHub-303030.svg?maxAge=300&style=flat-square
   :target: https://github.com/PyFilesystem/pyfilesystem2

.. |PyPI fs| image:: https://img.shields.io/pypi/v/fs.svg?maxAge=300&style=flat-square
   :target: https://pypi.python.org/pypi/fs

.. |License paramiko| image:: https://img.shields.io/pypi/l/paramiko.svg?maxAge=300&style=flat-square
   :target: https://choosealicense.com/licenses/lgpl-2.1/

.. |Source paramiko| image:: https://img.shields.io/badge/source-GitHub-303030.svg?maxAge=300&style=flat-square
   :target: https://github.com/paramiko/paramiko

.. |PyPI paramiko| image:: https://img.shields.io/pypi/v/paramiko.svg?maxAge=300&style=flat-square
   :target: https://pypi.python.org/pypi/paramiko


Installation
------------

Install directly from PyPI, using `pip <https://pip.pypa.io/>`_ ::

    pip install fs.sshfs


Usage
-----

Use ``fs.open_fs`` to open a filesystem with an SSH
`FS URL <https://pyfilesystem2.readthedocs.io/en/latest/openers.html>`_:

.. code:: python

   import fs
   my_fs = fs.open_fs("ssh://user:password@host:port/resource")

with the following optional parts:

* ``user``: defaults to the current user
* ``password``: if none provided, passwordless authentification methods are
  used (either using public keys or no authentification to connect to the host)
* ``port``: defaults to the usual SSH port (port 22)
* ``resource``: defaults to the root directory (``"/"``)


For a more granular way of connecting to an SSH server, use the ``fs.sshfs.SSHFS``
constructor, which signature is:

.. code:: python

    from fs.sshfs import SSHFS
    my_fs = SSHFS(
      host,            # The name or adress of the SSH server
      user=None,       # an optional username, defaults to the current user
      passwd=None,     # an optional password, not needed if using a public key or
                       #   an SSH server without authentification
      pkey=None,       # a `paramiko.PKey` object, used to connect with a
                       #   specific key (undiscoverable key, etc.)
      timeout=10,      # The timeout of the connection, in seconds
                       #   (None to disable)
      port=22,         # The port to which to connect, default to default SSH port
      keepalive=10,    # The interval of time between keepalive packets, in
                       #    seconds (0 to disable)
      compress=False   # Compress the communications with the server
    )


Once created, the ``SSHFS`` filesystem behaves like any other filesystem
(see the `Pyfilesystem2 documentation <https://pyfilesystem2.readthedocs.io>`_)


See also
--------

* `fs <https://github.com/Pyfilesystem/pyfilesystem2>`_, the core pyfilesystem2 library
* `fs.archive <https://github.com/althonos/fs.archive>`_, enhanced archive filesystems
  for pyfilesystem2
* `fs.proxy <https://github.com/althonos/fs.proxy>`_, miscellaneous proxy filesystems
  for pyfilesystem2


