Skip to content

Downloadfromftp

flowtask.components.DownloadFromFTP

DownloadFromSmartSheet Download an Excel file from SmartSheet.

  Example:

  ```yaml
  DownloadFromFTP:
    host: trendmicro_host
    port: trendmicro_port
    use_tls: false
    file:
      pattern: '{monday}.*-Limited852StoreReport.{saturday}.csv'
      values:
        monday:
        - date_dow
        - day_of_week: monday
          mask: '%Y%m%d'
        saturday:
        - date_diff_dow
        - diff: 7
          day_of_week: saturday
          mask: '%Y-%m-%d'
      directory: /Limited852Report
    credentials:
      user: trendmicro_user
      password: trendmicro_password
    download:
      directory: /home/ubuntu/symbits/trendmicro/files/market_share/
  ```

DownloadFromFTP

DownloadFromFTP(credentials=None, host=None, port=None, **kwargs)

Bases: FTPClient, DownloadFromBase

DownloadFromFTP

Overview

Downloads files from a remote FTP server using the functionality from DownloadFrom.

Properties

.. table:: Properties :widths: auto

+--------------+----------+-----------+--------------------------------------------------------+ | Name | Required | Summary | +--------------+----------+-----------+--------------------------------------------------------+ | credentials | Yes | Dictionary containing username and password for FTP authentication.| | | | (default: {"user": str, "password": str}) | +--------------+----------+-----------+--------------------------------------------------------+ | whole_dir | Yes | Boolean flag indicating whether to download the entire directory | | | | or specific files. (default: False) | +--------------+----------+-----------+--------------------------------------------------------+ | use_tls | Yes | Boolean for indicate if we need to use the TLS protocol | +--------------+----------+-----------+--------------------------------------------------------+

Save the downloaded files on the new destination.