Function easing life :)
Project description
pynut - Laurent Tupin
It provides various functions to simplify the users life.
Installation
You can install the package from PyPI:
python -m pip install pynut-ftp
The package is supported on Python 3.7 and above.
How to use
You can call a function as this example:
$ ----------------------------------------------------
>>> from pyNutTools import nutDate
>>> nutDate.today()
This is the libraries I am using with the package
$ ----------------------------------------------------
>>> paramiko==2.11.0
Documentation
Temporary documentation for nutFtp :
Class c_FTP and c_SFTP allow you to Download / Upload on a server
Decorated to be a singleton as to keep the same instance / connection
FTP uses the ftplib library, SFTP paramiko
from pyNutFtp import nutFtp as ftp
1.1. Download FTP
ftp.fBl_ftpDownFileBinary(host, uid, pwd, ['FTP Folder'], fileName, folderToSave, bl_ssl = False)
OR
_ftp = ftp.ftp_prep(host, uid, pwd, ['FTP Folder'], bl_ssl = False)
_ftp.ftp_DownloadFile(fileName, folderToSave)
1.2. Download SFTP
ftp.ssh_downFile(host, uid, pwd, ['FTP Folder'], fileName, folderToSave, int_port = 10022)
OR
_sftp = sftp_prep(host, uid, pwd, ['FTP Folder'], int_timeout = -1, int_port = 10022)
_sftp.sftp_DownloadFile(fileName, folderToSave)
2.1 Upload FTP
ftp.fBl_ftpUpFile_Bi(host, uid, pwd, ['FTP Folder'], fileName, folderToSave, bl_ssl = False)
OR
_ftp = ftp_prep(host, uid, pwd, ['FTP Folder'], bl_ssl = False)
_ftp.ftp_UploadFile(fileName, folderToSave)
2.2 Upload SFTP
bl_success = ftp.ssh_upFile(host, uid, pwd, ['FTP Folder'], fileName, folderToSave, int_port = 10022)
OR
_sftp = sftp_prep(host, uid, pwd, ['FTP Folder'], int_port = 10022)
_sftp.sftp_UploadFile(fileName, folderToSave)
END
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
pynut-ftp-2.1.3.tar.gz
(20.2 kB
view hashes)
Built Distribution
pynut_ftp-2.1.3-py3-none-any.whl
(19.5 kB
view hashes)
Close
Hashes for pynut_ftp-2.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ee8137f83109a821afdfaa5dd8c99845b0d5503d4b42839eb56df082ea1d078 |
|
MD5 | 581d8ee26aafbd573dbf61cd59f729fc |
|
BLAKE2b-256 | f1a3c87241d896ea07d30f7399f8bdda803a536579c28ef84f7d241f9b39e75d |