Skip to main content

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


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.5.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pynut_ftp-2.1.5-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file pynut-ftp-2.1.5.tar.gz.

File metadata

  • Download URL: pynut-ftp-2.1.5.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.9

File hashes

Hashes for pynut-ftp-2.1.5.tar.gz
Algorithm Hash digest
SHA256 337ec30fbc3048b0ad809daa40ef6b40cdcfb70005397ee6254b5d8c840c6336
MD5 7f9315a2d84b37eb5482280ec83e184d
BLAKE2b-256 03e0c70397f0447cced50737c36cad9dacfecbbfbe56a5b6f9ac78e1991283de

See more details on using hashes here.

File details

Details for the file pynut_ftp-2.1.5-py3-none-any.whl.

File metadata

  • Download URL: pynut_ftp-2.1.5-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.9

File hashes

Hashes for pynut_ftp-2.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 5011c8b96f428b6356dc406c6aa553516375ca538a4c4e7540fa7e504ac29bb1
MD5 d3e276822dae9a590291d885f80a8697
BLAKE2b-256 4cf4083471a9ecf0fa21fac3d1275e791b382bbaec5d16b0bd4934fd611c6e2d

See more details on using hashes here.

Supported by

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