• Stars
    star
    317
  • Rank 131,502 (Top 3 %)
  • Language
    Python
  • License
    Other
  • Created almost 12 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

NTLM authentication support for Requests.

requests-ntlm

This package allows for HTTP NTLM authentication using the requests library.

Usage

HttpNtlmAuth extends requests AuthBase, so usage is simple:

import requests
from requests_ntlm import HttpNtlmAuth

requests.get("http://ntlm_protected_site.com",auth=HttpNtlmAuth('domain\\username','password'))

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_ntlm import HttpNtlmAuth

session = requests.Session()
session.auth = HttpNtlmAuth('domain\\username','password')
session.get('http://ntlm_protected_site.com')

Installation

pip install requests_ntlm

Requirements

Authors