Python ftplib Module
Example
Confirm the FTP class is available (no network connection made):
import ftplib
print(hasattr(ftplib, "FTP"))
Try it Yourself »
Definition and Usage
The ftplib module implements the client side of the FTP protocol.
Use it to connect to FTP servers, list directories, and transfer files. For secure transfers, consider external libraries like ftps or sftp clients.
Members
Member | Description |
---|---|
FTP | Main FTP client class. |
FTP_TLS | FTP client class with TLS support. |
error_perm | Exception for permanent errors. |
error_temp | Exception for temporary errors. |
all_errors | Tuple grouping all ftplib exceptions. |