How can I upload a file to Sharepoint using Python?

John Dwyer 1 Reputation point
2021-08-18T09:45:49.667+00:00

I have a Python test automation solution that produces a results files (both XML and JSON). I'd like to upload this file to our Sharepoint portal as soon as the automation is complete. I can then use Power Automate to parse and append the correct data to an excel spreadsheet.
Can someone suggest how this can be done?
Many thanks,
J.

Microsoft 365 and Office SharePoint Development
Microsoft 365 and Office SharePoint For business Windows
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. RaytheonXie_MSFT 40,471 Reputation points Microsoft External Staff
    2021-08-19T02:50:13.82+00:00

    Hi @John Dwyer ,
    Please refer to the following link to upload your file to sharepoint.
    https://github.com/iamlu-coding/python-upload2sharepoint


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

  2. Aditya Pawar 0 Reputation points
    2024-06-01T11:30:28.7433333+00:00
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.