本文介绍了我如何使用 python 中的共享点(通过soap?)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在 python (C-Python) 中使用 Sharepoint

有人试过吗?

解决方案

我怀疑自从回答了这个问题后,SUDS 库已经更新以处理所需的身份验证本身.跳过各种圈套后,我发现这样做可以解决问题:

从 suds 导入 WebFault从 suds.client 导入 *从 suds.transport.https 导入 WindowsHttpAuthenticated用户 = r'服务器\用户'密码 = "你的密码"url = "http://sharepointserver/_vti_bin/SiteData.asmx?WSDL"ntlm = WindowsHttpAuthenticated(用户名 = 用户,密码 = 密码)客户端 = 客户端(网址,传输 = ntlm)

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

Has anyone tried this before ?

解决方案

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)

这篇关于我如何使用 python 中的共享点(通过soap?)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-08 05:27