httpx-ntlm
This package allows for HTTP NTLM authentication using the HTTPX library.
What it is and what it does
httpx-ntlm is a thin authentication adapter that plugs NTLM support into the HTTPX HTTP client library. It wraps the NTLM negotiation logic from pyspnego and exposes it as an HTTPX Auth handler, so you can pass credentials to httpx.Client() or individual requests and have NTLM challenge-response handled automatically.
The package is most useful when you need to access corporate or legacy HTTP services that require Windows domain authentication. It supports connection pooling through HTTPX's Client, which is more efficient than per-request authentication since NTLM authenticates connections. The implementation is an adaptation of requests-ntlm for HTTPX.
Use it for:
- Authenticate to corporate intranet services or SharePoint sites that require NTLM without leaving Python.
- Build automated tools that need to fetch data from legacy Windows-authenticated HTTP APIs.
- Reuse HTTPX's connection pooling while maintaining NTLM auth for enterprise environments.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds NTLM authentication support to HTTPX, enabling HTTP requests to servers that require Windows NTLM credentials.
Yes, if you need NTLM authentication with HTTPX and your environment is stable. The package has no known vulnerabilities and low install friction. However, dormant maintenance means you should verify that pyspnego remains compatible with your target authentication systems before committing to production use.
Install
httpx-ntlm on PyPI
pip
pip install httpx-ntlmuv
uv add httpx-ntlmpoetry
poetry add httpx-ntlmInstalling httpx-ntlm
Before you install
Low install friction with only 2 runtime dependencies (httpx and pyspnego). Maintenance is dormant—last release was 2023-11-03, though the repository remains active.
License in practice
ISC license is permissive and places minimal restrictions on use, modification, or redistribution in commercial or private projects.
Quickstart
pip install httpx-ntlm
import httpx
from httpx_ntlm import HttpNtlmAuth
client = httpx.Client(auth=HttpNtlmAuth('domain\\username', 'password'))
response = client.get('http://ntlm_protected_site.com')
Verify before relying
- Whether pyspnego's NTLM implementation remains compatible with current Windows/Active Directory authentication schemes.
- Whether dormant maintenance status means the package will receive security updates if NTLM or httpx evolve.
- Production readiness given the extended time since the last release.
Package facts
| License | ISC (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — httpx, pyspnego |
| Maintenance | dormant — 1,015 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 288,559/month — #8,020 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: httpx_ntlm-1.4.0-py3-none-any.whl
Tags
More WWW/HTTP packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
h11h11 is a pure-Python HTTP/1.1 protocol…
permissive · top 100 on PyPI
httpxHTTPX is a fully featured HTTP client library…
permissive · top 100 on PyPI
httpcoreA minimal low-level HTTP client library that…
permissive · top 100 on PyPI
aiohttpaiohttp is an async HTTP client and server…
permissive · top 100 on PyPI
requests-ntlmAdds NTLM authentication support to the…
permissive · top 5,000 on PyPI
ntlm-authConstructs and parses NTLM authentication…
permissive · top 5,000 on PyPI
requests-ntlm2Adds NTLM authentication support to the…
permissive · top 15,000 on PyPI
requests-ntlm3Provides HTTP NTLM authentication for the…
permissive · top 15,000 on PyPI
requests-credsspAdds CredSSP authentication support to the…
permissive · top 15,000 on PyPI
pyspnegoHandles SPNEGO, NTLM, Kerberos, and CredSSP…
permissive · top 1,000 on PyPI
python-pamPython wrapper for Linux PAM (Pluggable…
permissive · top 5,000 on PyPI
httpx-authProvides authentication classes for httpx HTTP…
permissive · top 5,000 on PyPI
requests-authAdds OAuth2, API key, Basic, and NTLM…
permissive · top 15,000 on PyPI
curlify2Converts Python requests and httpx HTTP request…
permissive · top 15,000 on PyPI