Skip to main content

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


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

simple_sftp-0.1.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file simple_sftp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: simple_sftp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for simple_sftp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5dd674091ba842e9e029013d49bdf623c572a9691f46a18f10f00d978eade8b0
MD5 36c2436e240ff4d2a97051dc77eecf6f
BLAKE2b-256 9128678b58f6cf2ee7ccc093c6471e8cc29c9013773dbd97b3eb457c8319c1bd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page