code: def update_sandbox_site(comment_text):
      
  
      file_to_deliver = NamedTemporaryFile(delete=False)
  
      file_text = "Deployed at: {} <br /> Comment: {}".format(datetime.datetime.now().strftime('%c'), cgi.escape(comment_text))
  
      file_to_deliver.write(file_text)
      file_to_deliver.close()
  
      put(file_to_deliver.name, '/var/www/html/index.html', use_sudo=True)
docs: put's a text file on the server