Skip to content

aghuttun/fileshiftlib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fileshiftlib

Package Description

SFTP client Python package that uses paramiko library.

Usage

from a script:

import fileshiftlib

host = "localhost"
username = "123..."
password = "xxxx"
port = 22

# Initialize SFTP client
sftp = fileshiftlib.SFTP(host=host,
                         username=username,
                         password=password,
                         port=port,
                         logger=None)
content_list = sftp.list_dir()
print(content_list)
sftp.change_dir(path=".")
sftp.delete_file(filename=r"demo.txt")
sftp.download_file(remote_path=r"/demo/demo.txt", local_path=r"c:\local\demo.txt")
sftp.upload_file(local_path=r"c:\local\demo.txt", remote_path=r"/demo/demo.txt")

Installation

Install python and pip if you have not already.

Then run:

pip install pip --upgrade

For production:

pip install fileshiftlib

This will install the package and all of it's python dependencies.

If you want to install the project for development:

git clone https://github.com/aghuttun/fileshiftlib.git
cd fileshiftlib
pip install -e ".[dev]"

To test the development package: Testing

License

BSD License (see license file)

About

SFTP client

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages