https://github.com/requests/requests-ntlm
NTLM authentication support for Requests.
https://github.com/requests/requests-ntlm
Last synced: 7 months ago
JSON representation
NTLM authentication support for Requests.
- Host: GitHub
- URL: https://github.com/requests/requests-ntlm
- Owner: requests
- License: other
- Created: 2012-11-15T14:26:00.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2024-06-09T23:50:47.000Z (over 1 year ago)
- Last Synced: 2025-05-08T00:03:24.717Z (8 months ago)
- Language: Python
- Size: 131 KB
- Stars: 341
- Watchers: 19
- Forks: 100
- Open Issues: 22
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
requests-ntlm
=============
.. image:: https://github.com/requests/requests-ntlm/actions/workflows/ci.yml/badge.svg
:target: https://github.com/requests/requests-ntlm/actions/workflows/ci.yml
This package allows for HTTP NTLM authentication using the requests library.
Usage
-----
``HttpNtlmAuth`` extends requests ``AuthBase``, so usage is simple:
.. code:: python
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.
.. code:: python
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
------------
- requests_
- pyspnego_
.. _requests: https://github.com/kennethreitz/requests/
.. _pyspnego: https://github.com/jborean93/pyspnego/
Authors
-------
- `Ben Toews`_
.. _Ben Toews: https://github.com/mastahyeti
- `Ian Cordasco`_
.. _Ian Cordasco: https://github.com/sigmavirus24
- `Cory Benfield`_
.. _Cory Benfield: https://github.com/Lukasa