CData Python Connector for FTP

Build 24.0.9060

Establishing a Connection

The objects available within our connector are accessible from the "cdata.ftp" module. To use the module's objects directly:

  1. Import the module as follows:
    import cdata.ftp as mod
  2. To establish a connection string, call the connect() method from the connector object using an appropriate connection string, such as:
    mod.connect("RemoteHost=MyFTPServer;")

The CData Python Connector for FTP allows connecting to FTP servers.

Connecting to an FTP Server

FTP supports both plaintext and SSL/TLS connections. To connect to an FTP server specify the RemoteHost, User, and Password. Set SSLMode and SSLServerCert to secure connections with TLS/SSL. See SSL Configuration for more information on configuring connectivity over TLS/SSL.

Connecting to Data

Set the following connection properties to control the relational view of the file system:

  • RemotePath: Set this to the current working directory.
  • TableDepth: Set this to control the depth of subfolders to report as views.
  • FileRetrievalDepth: Set this to retrieve files recursively and list them in the Root table.
Stored Procedures are available to download files, upload files, and send protocol commands. See Data Model for more on using SQL to interact with the server.

Copyright (c) 2024 CData Software, Inc. - All rights reserved.
Build 24.0.9060