SSH Filesystem -- Async SSH/SFTP backend for fsspec
Project description
sshfs
sshfs is a filesystem interface for SSH/SFTP. It is based on top of asyncssh and implements the fsspec protocol.
Features
- Supports filesystem operations outside of SFTP, e.g server side copy
- Auto SFTP channel management
- Async! (thanks to
asyncssh
)
Example
from sshfs import SSHFileSystem
# Connect with a password
fs = SSHFileSystem(
'127.0.0.1',
username='sam',
password='fishing'
)
# or with a private key
fs = SSHFileSystem(
'ssh.example.com',
client_keys=['/path/to/ssh/key']
)
details = fs.info('/tmp')
print(f'{details['name']} is a {details['type']}!')
with fs.open('/tmp/message.dat', 'wb') as stream:
stream.write(b'super secret messsage!')
with fs.open('/tmp/message.dat') as stream:
print(stream.read())
fs.mkdir('/tmp/dir')
fs.mkdir('/tmp/dir/eggs')
fs.touch('/tmp/dir/spam')
fs.touch('/tmp/dir/eggs/quux')
for file in fs.find('/tmp/dir'):
print(file)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
sshfs-2021.6.0a15.tar.gz
(12.7 kB
view hashes)
Built Distribution
Close
Hashes for sshfs-2021.6.0a15-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f287461587f59a1e6e4bfa6ef9c807c9efc4dec7178d98c7f1eb31649474134b |
|
MD5 | 8f179f8d6c61ecb6c673860a32443b04 |
|
BLAKE2b-256 | 264c5894f765bed1dae7126481d0feda2d0cd0ff053ce112f968f97912e7aed5 |