Skip to main content

SSHFS, NFS clients.

Project description

Description

For the moment there are two classes in the package: SshfsSaver and NfsSaver. They are used to write data to a remote server via passing a writing func to.save() method.

Any writing function must require a save path as its first argument, but since a saver is initialized with a target directory, there is no need to pass it in the args.

Usage example

import os
from mountvfs import Sshfs


def write(filepath, filename, text):
    with open(os.path.join(filepath, filename), 'w') as ouf:
        ouf.write(file)


MOUNT_PARAMS = {
    'user': 'test_user', 
    'server: 'test_server', 
    'remote_dir': 'path/to/mounted/remote/dir',
    'key': 'path/to/ssh/private/key',
    'target_dir': 'path/to/mounted/local/dir'
}

with Sshfs(**MOUNT_PARAMS) as saver:
     saver.save(write, args=('test_filename', 'test_text')) 

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mountvfs-0.1.7.tar.gz (3.6 kB view hashes)

Uploaded source

Built Distribution

mountvfs-0.1.7-py3-none-any.whl (9.0 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page