pysftp vs. Paramiko

前端 未结 1 701
攒了一身酷
攒了一身酷 2020-12-06 02:03

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 usi

1条回答
  •  眼角桃花
    2020-12-06 02:39

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

    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, advanced keyboard interactive authentication, setting a timeout, etc), use pysftp as it may be easier to work with.

    • If you need low-level features, use Paramiko.

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

    • You can access some Paramiko functionality not exposed in pysftp by using pysftp Connection.sftp_client, which returns underlying Paramiko SFTPClient object. For an example, see pysftp: How to update last modified date.

    0 讨论(0)
提交回复
热议问题