--- id: requests-ntlm version: "1.3.0" license: ISC license_treatment: permissive maintenance: active --- # requests-ntlm — This package allows for HTTP NTLM authentication using the requests library. License: permissive · Maintenance: active · Downloads: 15.4M/mo ## What it is and what it does requests-ntlm bridges the gap between the requests library and Windows NTLM authentication, a protocol commonly required by corporate and legacy HTTP servers. It provides an HttpNtlmAuth class that integrates directly with requests' authentication framework, handling the NTLM challenge-response handshake transparently. The package depends on pyspnego for protocol handling and cryptography for cryptographic operations. Typical usage involves passing HttpNtlmAuth to a request's auth parameter with domain-qualified credentials. For efficiency, the documentation recommends using requests.Session to enable connection pooling, since NTLM authenticates at the connection level rather than per-request. The package supports Python 3.8 through 3.12 and is classified as Beta, reflecting its mature but still-evolving status. Use it for: - Authenticate requests to corporate intranet servers that require NTLM credentials instead of basic HTTP auth. - Build automation scripts that interact with Windows-protected APIs or file shares over HTTP. - Integrate with legacy enterprise systems that mandate NTLM for HTTP access. - Establish persistent sessions to NTLM-protected endpoints using connection pooling for efficiency. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Adds NTLM authentication support to the requests library, allowing HTTP requests to servers that require Windows NTLM credentials. Yes, if you need to authenticate against NTLM-protected servers. The package is actively maintained, has no known vulnerabilities, low install friction, and a permissive license. It is the standard solution for this specific use case within the requests ecosystem. Not needed if your HTTP targets use standard authentication schemes. ## Install pip install requests-ntlm uv add requests-ntlm poetry add requests-ntlm ## Installing requests-ntlm Before you install: Low friction installation with three straightforward dependencies (requests, pyspnego, cryptography). Actively maintained with recent commits and a stable release history since 2013. License in practice: ISC license is permissive, allowing use in commercial and proprietary projects with minimal restrictions. Quickstart: pip install requests-ntlm import requests from requests_ntlm import HttpNtlmAuth requests.get('http://ntlm_protected_site.com', auth=HttpNtlmAuth('domain\\username', 'password')) Verify before relying: - Whether connection pooling with sessions provides measurable performance gains for repeated NTLM-authenticated requests in typical workloads. - Support for NTLM v2 and other protocol variants beyond basic NTLM authentication. ## Package facts - License: ISC (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 15.4M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags ntlm authentication requests, windows ntlm http auth, requests ntlm support, http ntlm credentials, domain authentication requests, windows domain http auth, authentication, windows-integration, enterprise [View on SkillFed](https://skillfed.io/packages/requests-ntlm) · [View on PyPI](https://pypi.org/project/requests-ntlm/)