requests-ntlm 1.3.0


pip install requests-ntlm

  Latest version

Released: Jun 09, 2024

Project Links

Meta
Author: Ben Toews
Requires Python: >=3.8

Classifiers

Development Status
  • 4 - Beta

Intended Audience
  • Developers

Programming Language
  • Python
  • Python :: 3
  • Python :: 3.8
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11
  • Python :: 3.12

License
  • OSI Approved :: ISC License (ISCL)
https://github.com/requests/requests-ntlm/actions/workflows/ci.yml/badge.svg

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

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras: None
Dependencies:
cryptography (>=1.3)
pyspnego (>=0.4.0)
requests (>=2.0.0)