pysftp与Paramiko [英] pysftp vs. Paramiko

查看:115
本文介绍了pysftp与Paramiko的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个简单的要求,即可将文件拖放到SFTP服务器上.我发现pysftp和Paramiko库似乎允许我这样做,并使用Paramiko开发了一个简单的应用程序,但是我找不到比较这两者的正确来源,因此我可以决定可以/应该使用哪个.每种都有什么优缺点?

I have a simple requirement to drop a file on an SFTP server. I have found pysftp and Paramiko libraries that seem to allow me to this and developed a simple application using Paramiko but I can't find a proper source that compares the two so I can decide which one I can/should use. What are the pros and cons for each?

推荐答案

pysftp是Paramiko的包装,具有更多类似Python的界面.

pysftp is a wrapper around Paramiko with a more Python-ish interface.

pysftp界面未公开Paramiko的所有功能.另一方面,pysftp在Paramiko的基础上实现了更多高级功能,尤其是递归文件传输.

pysftp interface does not expose all of the features of Paramiko. On the other hand, pysftp implements more high-level features on top of Paramiko, notably recursive file transfers.

  • If you do not have any fancy low-level needs (like unusual methods of verifying host key, proxies, etc), use pysftp as it may be easier to work with.

如果需要低级功能,请使用Paramiko.

If you need low-level features, use Paramiko.

如果同时需要两者,请使用Paramiko并检查 pysftp代码功能.

If you need both, use Paramiko and check pysftp code for the high-level features.

这篇关于pysftp与Paramiko的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆