title: Upload a file to a Sharepoint folder using Python
body: <p>I have a Python script that saves a file to a server shared folder for a user to access.  Our organization recently moved our server file structure to Sharepoint... including all the folders.  (I've read multiple articles that's a bad idea, but there's no changing it right now.)</p>
  
  <p>I have new code that uploads a file to the root folder of the Sharepoint library:</p>
  
  <p>import sharepy
  s = sharepy.connect("site.sharepoint.com", "username", "password")
  r = s.post("<a href="https://site.sharepoint.com/_api/web/Lists/GetByTitle" rel="noreferrer">https://site.sharepoint.com/_api/web/Lists/GetByTitle</a>('Documents')/RootFolder/files\
  /add(overwrite=true,url='test.csv')", \
  "testing,foo,bar")
  print(r)</p>
  
  <p>Is there a way to upload the file to a subfolder instead of the root?  If so, how?</p>