httpx-ntlm is a Python package that provides NTLM (NT LAN Manager) authentication support for the HTTPX asynchronous HTTP client library. As of version 1.4.0, it allows users to authenticate against NTLM-protected resources, adapting functionality from the requests-ntlm library. It maintains an active status with infrequent but relevant updates.
pip install httpx-ntlmVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates basic NTLM authentication using `httpx-ntlm` with both a direct `httpx.get` call and a more efficient `httpx.Client` instance for connection pooling. Remember to replace the placeholder URL and set NTLM_USERNAME and NTLM_PASSWORD environment variables with actual credentials.
Upgrade your httpx library to version 0.24 or higher: `pip install --upgrade httpx`.
Instantiate `httpx.Client(auth=HttpNtlmAuth(...))` and use the client for subsequent requests: `client.get(...)`.
Evaluate alternatives like Kerberos for authentication, or ensure NTLM remains explicitly enabled and secured in your server environment (if outside your control).
Verify credentials, including the domain part, and ensure they are correct. Double-check for typos or incorrect domain separators.
Install the package using pip: `pip install httpx-ntlm`.
Correct the import statement to `from httpx_ntlm import HttpNtlmAuth` and ensure the class name `HttpNtlmAuth` is used correctly.