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.

SharePoint
SharePoint
A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
10,150 questions
SharePoint Development
SharePoint Development
SharePoint: A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.Development: The process of researching, productizing, and refining new or existing technologies.
2,783 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. RaytheonXie_MSFT 33,176 Reputation points Microsoft Vendor
    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