File-like operations without the file?
<p>I'm working on an automation tool that will copy a series of commands to a file on a remote system and then ssh to the remote system and execute that file. I'm looking at the docs for paramiko, which has the needed sftp and ssh command capabilities I'll need.</p>

<p>However, I'm noticing that the paramiko.SFTPClient.put() method takes the name of a local and remote path as arguments. I'd like to be able to not have to write the file locally first, and find a way to have SFTPClient.put take in a file-like object instead of pointing to an actual file. </p>

<p>Is there a way to do this within python by handing SFTPClient.put() an object reference instead of a file path, or via a named pipe if SFTPClient.put() can't handle anything that's not an actual file?</p>
