how can i use sharepoint (via soap?) from python?

前端 未结 4 1888
别那么骄傲
别那么骄傲 2020-12-13 22:17

I want to use Sharepoint with python (C-Python)

Has anyone tried this before ?

4条回答
  •  無奈伤痛
    2020-12-13 22:56

    I suspect that since this question was answered the SUDS library has been updated to take care of the required authentication itself. After jumping through various hoops, I found this to do the trick:

    
    from suds import WebFault
    from suds.client import *
    from suds.transport.https import WindowsHttpAuthenticated
    
    
    user = r'SERVER\user'
    password = "yourpassword"
    url = "http://sharepointserver/_vti_bin/SiteData.asmx?WSDL"
    
    
    ntlm = WindowsHttpAuthenticated(username = user, password = password)
    client = Client(url, transport=ntlm)
    
    

提交回复
热议问题