This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# A simple demonstration of authenticating against ntlm. | |
# In this case we needed to be certain that we could access | |
# the SharePoint REST API through python. | |
import requests | |
from requests_ntlm import HttpNtlmAuth | |
def rest_test(domain, user, password, url): | |
# create a session | |
session = requests.Session() |