python-ntlm
Python library that provides NTLM support, including an authentication handler for urllib2.
This library allows you to retrieve content from (usually corporate) servers protected with windows authentication (NTLM) using the python urllib2.
Python 3 Support
There is work going on to port the library to python 3, you can find it in the python30 directory. (at this time it seems to work as good as the python 2 library)
Usage
Simple example
urllib2 ntlm user password url passman urllib2 passmanadd_password url user password auth_NTLM passman opener urllib2build_openerauth_NTLM urllib2install_openeropener response urllib2urlopenurl responseread
Extended Example
urllib2 urlparse urlparse urlunparse ntlm user password url parsed_url urlparsehref base_uri urlunparseparsed_urlparsed_url passman urllib2 passmanadd_password base_uri user password auth_NTLM passman auth_basic urllib2passman auth_digest urllib2passman proxy_handler urllib2 opener urllib2build_openerproxy_handler auth_NTLM auth_digest auth_basic urllib2install_openeropener response urllib2urlopenurl responseread
Limitations
- A request using the HTTPNtlmAuthHandler