Package: ldap3
ldap3 is a strictly RFC 4510 conformingLDAP V3 pure Python clientlibrary. The same codebase runs in Python 2, Python 3, PyPy and PyPy3.A more pythonic LDAPLDAP operations look clumsy and hard-to-use because they reflect the old-age idea that time-consuming operations should be performed client-side
to not hog the server with heavy elaborations. To alleviate this ldap3 includes a fully functionalAbstraction Layerthat lets you
interact with the LDAP server in a modern andpythonicway. With the Abstraction Layer you don’t need to directly issue any LDAP operation at all.Thread safe strategiesIn multithreaded programs you must use on ofSAFE_SYNC(synchronous connection strategy),SAFE_RESTARTABLE(restartable syncronous connection strategy) orASYNC(asynchronous connection strategy).Each LDAP operation with SAFE_SYNC or SAFE_RESTARTABLE strategies returns a tuple of four elements: status, result, response and request.status: states if the operation was successfulresult: the LDAP result of the operationresponse: the response of a LDAP Search Operationrequest: the original request of the operationThe SafeSync strategy can be used with the Abstract Layer, but the Abstract Layer currently is NOT thread safe.
For example, to useSAFE_SYNC:from ldap3 import Server, Connection, SAFE_SYNC
server = Server('my_server')
conn = Connection(server, 'my_user', 'my_password', client_strategy=SAFE_SYNC, auto_bind=True)
status, result, response, _ = conn.search('o=test', '(objectclass=*)')  # usually you don't need the original request (4th element of the returned tuple)WithASYNCyou must request the response with theget_response()method.Home PageThe home page of the ldap3 project ishttps://github.com/cannatag/ldap3DocumentationDocumentation is available athttp://ldap3.readthedocs.ioLicenseThe ldap3 project is open source software released under theLGPL v3 license.
Copyright 2013 - 2020 Giovanni CannataPEP8 Complianceldap3 is PEP8 compliant, except for line length.DownloadPackage download is available athttps://pypi.python.org/pypi/ldap3.InstallInstall withpip install ldap3Git repositoryYou can download the latest source athttps://github.com/cannatag/ldap3Continuous integrationContinuous integration for testing is athttps://travis-ci.org/cannatag/ldap3Support & DevelopmentYou can submit support tickets onhttps://github.com/cannatag/ldap3/issues/newYou can submit pull request on thedevbranch athttps://github.com/cannatag/ldap3/tree/devThanks toIlya Etingof, the author of thepyasn1package for his excellent work and support.Mark Lutzfor hisLearning PythonandProgramming Pythonexcellent books series andJohn GoerzenandBrandon Rhodesfor their bookFoundations of Python Network Programming. These books are wonderful tools for learning Python and this project owes a lot to them.JetBrainsfor donating to this project the Open Source license ofPyCharm Professional.GitHubfor providing thefree source repository space and the toolsI use to develop this project.TheFreeIPAteam for letting me use their demo LDAP server in the ldap3 tutorial.Contact meFor information and suggestions you can contact me atcannatag@gmail.com. You can also open a support ticket onhttps://github.com/cannatag/ldap3/issues/newDonateIf you want to keep this project up and running you can send me an Amazon gift card. I will use it to improve my skills in Information and Communication technologies.ChangelogUpdated changelog athttps://ldap3.readthedocs.io/changelog.html