module filehelper.transfer_api_ftp

Inheritance diagram of pyquickhelper.filehelper.transfer_api_ftp

Short summary

module pyquickhelper.filehelper.transfer_api_ftp

API to move files using FTP

source on GitHub

Classes

class

truncated documentation

TransferAPIFtp

Defines an API to transfer files over a remote location through FTP.

Methods

method

truncated documentation

__init__

close

close the connection

connect

connect

retrieve

retrieve data from path

transfer

It assumes a data holds in memory, tansfer data to path.

Documentation

API to move files using FTP

source on GitHub

class pyquickhelper.filehelper.transfer_api_ftp.TransferAPIFtp(site, login, password, root='backup', ftps='FTP', fLOG=<function noLOG>)[source]

Bases: TransferAPI

Defines an API to transfer files over a remote location through FTP.

source on GitHub

Parameters:
  • site – website

  • login – login

  • password – password

  • root – root on the website

  • ftps – protocol, see TransferFTP

  • fLOG – logging function

source on GitHub

__init__(site, login, password, root='backup', ftps='FTP', fLOG=<function noLOG>)[source]
Parameters:
  • site – website

  • login – login

  • password – password

  • root – root on the website

  • ftps – protocol, see TransferFTP

  • fLOG – logging function

source on GitHub

close()[source]

close the connection

source on GitHub

connect()[source]

source on GitHub

retrieve(path, exc=True)[source]

retrieve data from path

Parameters:
  • path – remove location

  • exc – keep exception

Returns:

data

source on GitHub

transfer(path, data)[source]

It assumes a data holds in memory, tansfer data to path.

Parameters:
  • data – bytes

  • path – path to remove location

Returns:

boolean

source on GitHub