Simple way to handle sftp with python
Project description
Simple way to handle sftp with python. Provides the ability to upload and download directories.
Installation
install the latest stable version using pip
$ pip install simple-sftp
Usage
from simple_sftp.client import Client
ip = < FTP SERVER IP >
user = < FTP LOGIN USER >
password = < FTP LOGIN PASSWORD >
PORT = < FTP CONNECT PORT > # not required. default 22
c = Client(ip, user, password)
Functions
upload
A function that uploads a specific directories to ftp server.
remote_path = < FTP SERVER REMOTE DIR PATH >
local_path = < LOCAL DIR PATH >
upload(remote_path, local_path)
download
A function that downloads a specific directories to ftp server.
remote_path = < FTP REMOTE DIR PATH >
local_path = < LOCAL DIR PATH >
download(remote_path, local_path)
Use console scripts
simple-sftp-cli --ip < FTP SERVER IP > --user < FTP LOGIN USER > --pwd < FTP LOGIN PASSWORD > --local < LOCAL_DIR_PATH > --remote < FTP SERVER REMOTE DIR PATH >
Example
simple-sftp-cli --ip 123.456.789.123 --user user --pwd 1234 --local /home/user/abc --remote /home/my/abc
Third Party Libraries and Dependencies
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file simple_sftp-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: simple_sftp-0.1.2-py3-none-any.whl
- Upload date:
- Size: 4.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.12.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e2466dda57e81edcde7edd6081a199fd46b5c7fcc5e5889992e9f462e6a6a8b1 |
|
MD5 | 767f08ed6ed2718e5a37830c5c3663bb |
|
BLAKE2b-256 | 1d536171480dc2d2d84e7d741dfe0f5776defeeb160a28e33d60ca004aea30f5 |