title: write to file on a remote server in python
body: <p>Is there any way to write to a file which is located on another server?</p>
  
  <p>I have access to a powerful server with lots of resources (CPU,GPU,RAM, etc) to execute complicated python code but the amount of storage is very limited (less than 1GB). On other hand, I have an unlimited storage space on another server without computational resources.</p>
  
  <p>I need a method to write the result of python code in one server, to another one. something like the following:</p>
  
  <pre><code>f = open('www.example.com/data.txt')
  f.write(pythoncode.results)
  </code></pre>
  
  <p>I know I can read a remote file simply with liburl:</p>
  
  <pre><code>import urllib3
  http = urllib3.PoolManager()
  r = http.request('GET', 'www.example.com/data.txt')
  r.data
  </code></pre>
  
  <p>So I am looking for something similar for writing instead of reading. </p>
  
  <p>(I can give the remote file write permission although I know it is not a good idea in general).</p>
  
  <p>Thank you in advance.</p>