Python Scripts for Downloading files via SFTP
engineering.monetate.com
engineering.monetate.com
The paramiko module is the "right" way of doing this in Python, and probably only appropriate if you need to integrate SFTP transactions into a larger, longer-running application.
Edit: I might add the use of a password in a command line argument is not advisable because it will get logged everywhere and show up in things like top, etc. Probably better to hardcode it or put it in a 0600 file.
[1]: http://en.wikipedia.org/wiki/Expect (In fact, there is a complete example for automating SFTP right in the article).
If you're going to keep credentials in plaintext on disk, at least make them keys and stop dicking about with expect.
From the code in the link it looks like for basic sftp tasks paramiko is simple enough that you really don't need a wrapper for it, but I'll take the single-page google code README for pysftp over paramiko's docs [2] any day
[1] http://code.google.com/p/pysftp/ [2] http://www.lag.net/paramiko/docs/
It does provide another arguments for the requests style simple, sensible interface over whatever it is that you need to make the underlying connections work. If paramiko had a high level 1 or 2 line way to retrieve a file, pysftp wouldn't have been someone's itch.
In short, this can be solved with proper access restrictions and full key-based authentication, and nothing but bash and scp/sftp.