This package allows for HTTP NTLM authentication using the requests library.
Project description
requests-ntlm2
requests-ntlm2, which is based on requests-ntlm , allows for HTTP NTLM authentication using the requests library.
Usage
HttpNtlmAuth
extends requests AuthBase
, so usage is simple:
import requests
from requests_ntlm2 import HttpNtlmAuth
auth=HttpNtlmAuth('domain\\username','password')
requests.get("http://ntlm_protected_site.com", auth=auth)
HttpNtlmAuth
can be used in conjunction with a Session
in order to
make use of connection pooling. Since NTLM authenticates connections,
this is more efficient. Otherwise, each request will go through a new
NTLM challenge-response.
import requests
from requests_ntlm2 import HttpNtlmAuth
session = requests.Session()
session.auth = HttpNtlmAuth('domain\\username','password')
session.get('http://ntlm_protected_site.com')
Installation
pip install requests-ntlm2
Requirements
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
requests_ntlm2-6.0.2.tar.gz
(5.9 kB
view hashes)