skillfed

requests-ntlm2

The HTTP NTLM proxy and/or server authentication library.

requests-ntlm2 v6.6.0 206.9K downloads/30d#9,563 on PyPI12
Permissive license ISC AGING released

What it is and what it does

requests-ntlm2 is an authentication plugin for the requests library that implements NTLM (NT LAN Manager) authentication, a Windows-native challenge-response protocol. It extends requests' AuthBase class to handle NTLM handshakes transparently, allowing you to authenticate against NTLM-protected servers and proxies without manual protocol handling. The package supports multiple NTLM compatibility levels (defaulting to NTLMv2 only) and integrates with requests' Session and proxy mechanisms for connection pooling and SSL tunnel creation via HTTP CONNECT.

The package depends on requests for HTTP transport, ntlm-auth for the core NTLM protocol implementation, and cryptography for cryptographic operations. It's designed for environments where NTLM is the required authentication scheme—typically corporate Windows-based infrastructure, proxies, or legacy systems. Usage is straightforward: instantiate HttpNtlmAuth with credentials and pass it to requests' auth parameter, or mount it as a session adapter for proxy tunneling.

Use it for:

  • Authenticate requests to corporate intranet servers that require NTLM credentials
  • Route requests through NTLM-protected corporate proxies using HTTP CONNECT tunneling
  • Maintain persistent NTLM-authenticated sessions with connection pooling to reduce handshake overhead
  • Integrate NTLM authentication into Python automation or data-collection scripts targeting Windows environments
  • Support legacy Windows-based APIs or services that do not accept modern OAuth or token-based auth

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Adds NTLM authentication support to the requests library, enabling HTTP requests to servers and proxies that require NTLM challenge-response authentication.

Yes, if you need NTLM authentication for requests in a Windows or corporate environment. The package is stable (Production/Stable classifier), permissively licensed, and has low install friction. However, the 443-day gap since last release and aging maintenance status mean you should verify compatibility with your current dependency versions and be prepared to maintain a fork if critical issues arise.

Install

requests-ntlm2 on PyPI

pip

pip install requests-ntlm2

uv

uv add requests-ntlm2

poetry

poetry add requests-ntlm2

Installing requests-ntlm2

Before you install

Low friction install with three stable runtime dependencies (requests, ntlm-auth, cryptography). Maintenance status is aging—last release was 443 days ago, though the repository remains active with a recent commit on 2025-05-28.

License in practice

Licensed under ISC (permissive), which allows commercial and private use with minimal restrictions, making it safe to adopt in most projects.

Quickstart

pip install requests-ntlm2

import requests
from requests_ntlm2 import HttpNtlmAuth

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

Verify before relying

  • Whether the package is actively maintained or in maintenance-only mode given the 443-day gap since last release
  • Current compatibility with the latest versions of requests, ntlm-auth, and cryptography

Package facts

License ISC (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 3 — requests, ntlm-auth, cryptography
Maintenance aging — 443 days since the last release
Last repo commit
First released
Downloads 206,922/month — #9,563 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: requests_ntlm2-6.6.0-py3-none-any.whl

Keywords: NTLM, requests, proxy, authorization, NTLM dance

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: ISC License (ISCL)Natural Language :: EnglishOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonTopic :: Software Development :: Version Control :: Git

Tags

NTLM authentication requestsHTTP NTLM proxy authWindows NTLM requests libraryNTLM challenge responserequests auth pluginNTLM proxy tunnelHTTP authentication NTLM
ntlm-authwindows-authproxy-auth

More Git packages