我正在使用tftpy在我的 Python 程序中创建 TFTP 服务器,效果惊人。但是,我需要其他类型的服务器:TFTP、FTP、SFTP。我可以使用什么包来支持所有这些?
最佳答案
每个协议(protocol)都需要自己的实现,例如:
但是,如果您坚持使用一个包来统治所有这些,并且不介意弄脏您的手,PycURL适合您:
PycURL is a Python interface to libcurl. PycURL can be used to fetch objects identified by a URL from a Python program, similar to the urllib Python module. PycURL is mature, very fast, and supports a lot of features.
libcurl is a free and easy-to-use client-side URL transfer library, supporting FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP, TELNET, DICT, LDAP, LDAPS, FILE, IMAP, SMTP, POP3 and RTSP. libcurl supports SSL certificates, HTTP POST, HTTP PUT, FTP uploading, HTTP form based upload, proxies, cookies, user+password authentication (Basic, Digest, NTLM, Negotiate, Kerberos4), file transfer resume, http proxy tunneling and more!
关于实现TFTP、FTP、SFTP服务器的Python包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23005565/