I have some if anybody wants one.
Archive for November, 2009
As PyCrypto and Paramiko are not ported to Python 3 yet, I’ve put together a library providing basic SFTP functionality for the interim. It wraps the ssh executable (not the command-line sftp client) and speaks the wire protocol over the encrypted channel.
The library currently has support for connecting, listing directories, getting files, putting files, removing files, creating directories, and removing directories. There’s also support for sending raw SFTP packets if necessary.
Everything is at a pretty early state and in rough form; there’s little to no error handling at all, and it’s only been tested against the servers I ordinarily have access to (a few fairly recent versions of OpenSSH). Use at your own risk, and patches welcome. Comments on the interface and API too.
It can be downloaded with either git clone https://gytha.org/py3sftp/ or git clone git://gytha.org/py3sftp.
It’s going to be integrated into another project I’m working on (the one that prompted me to write it, oddly enough), but I plan to keep maintaining it separately at least until Paramiko is available, and perhaps beyond since I like piggybacking on the functionality of OpenSSH itself (VisualHostKey is great).