I have tried basic auth while following this link. I have also followed this question to get my code below using NTLM auth. I am still being thrown a 401 error. Is this an outdated way of pulling SharePoint lists or is there something wrong with my code?
import requests
from requests_ntlm import HttpNtlmAuth
response = requests.get("https://example.com/_api/web/...", auth=HttpNtlmAuth('username', 'password'))
print(response.status_code)