{"id":28563814,"url":"https://github.com/twisted/ldaptor","last_synced_at":"2025-06-10T13:08:42.522Z","repository":{"id":18250645,"uuid":"21404464","full_name":"twisted/ldaptor","owner":"twisted","description":"LDAP server, client and utilities, using Twisted Python","archived":false,"fork":false,"pushed_at":"2025-05-26T19:24:28.000Z","size":1915,"stargazers_count":166,"open_issues_count":49,"forks_count":53,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-06-10T00:57:01.861Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/twisted.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-07-01T22:43:43.000Z","updated_at":"2025-04-12T18:55:56.000Z","dependencies_parsed_at":"2023-10-03T12:40:13.560Z","dependency_job_id":"79211f27-e56d-4956-8fa5-55efe3f55743","html_url":"https://github.com/twisted/ldaptor","commit_stats":{"total_commits":783,"total_committers":40,"mean_commits":19.575,"dds":0.5644955300127714,"last_synced_commit":"4bfe2897c8b9b510d647fb1c2a5b50c88d492ab1"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twisted%2Fldaptor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twisted%2Fldaptor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twisted%2Fldaptor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twisted%2Fldaptor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/twisted","download_url":"https://codeload.github.com/twisted/ldaptor/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twisted%2Fldaptor/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259081012,"owners_count":22802404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-10T13:08:39.747Z","updated_at":"2025-06-10T13:08:42.517Z","avatar_url":"https://github.com/twisted.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Ldaptor\n=======\n\n.. image:: https://img.shields.io/codecov/c/github/twisted/ldaptor?label=codecov\u0026logo=codecov\n    :alt: Codecov\n    :target: https://codecov.io/gh/twisted/ldaptor\n.. image:: https://img.shields.io/readthedocs/ldaptor?logo=read-the-docs\n    :alt: Read the Docs\n    :target: https://ldaptor.readthedocs.io/en/latest/\n.. image:: https://img.shields.io/github/workflow/status/twisted/ldaptor/CI?label=GitHub%20Actions\u0026logo=github\n    :alt: GitHub Actions\n    :target: https://github.com/twisted/ldaptor\n.. image:: https://img.shields.io/pypi/v/ldaptor?logo=pypi\n    :alt: PyPI\n    :target: https://pypi.org/project/ldaptor/\n.. image:: https://img.shields.io/badge/code%20style-black-black\n    :alt: Black\n    :target: https://github.com/psf/black\n\nLdaptor is a pure-Python library that implements:\n\n- LDAP client logic\n- separately-accessible LDAP and BER protocol message generation/parsing\n- ASCII-format LDAP filter generation and parsing\n- LDIF format data generation\n- Samba password changing logic\n\nAlso included is a set of LDAP utilities for use from the command line.\n\nVerbose documentation can be found on `ReadTheDocs \u003chttps://ldaptor.readthedocs.org\u003e`_.\n\n\nQuick Usage Example\n-------------------\n\n.. code-block:: python\n\n    from twisted.internet import reactor, defer\n    from ldaptor.protocols.ldap import ldapclient, ldapsyntax, ldapconnector\n\n    @defer.inlineCallbacks\n    def example():\n        # The following arguments may be also specified as unicode strings\n        # but it is recommended to use byte strings for ldaptor objects\n        serverip = b'192.168.128.21'\n        basedn = b'dc=example,dc=com'\n        binddn = b'bjensen@example.com'\n        bindpw = b'secret'\n        query = b'(cn=Babs*)'\n        c = ldapconnector.LDAPClientCreator(reactor, ldapclient.LDAPClient)\n        overrides = {basedn: (serverip, 389)}\n        client = yield c.connect(basedn, overrides=overrides)\n        yield client.bind(binddn, bindpw)\n        o = ldapsyntax.LDAPEntry(client, basedn)\n        results = yield o.search(filterText=query)\n        for entry in results:\n            print(entry.getLDIF())\n\n    if __name__ == '__main__':\n        df = example()\n        df.addErrback(lambda err: err.printTraceback())\n        df.addCallback(lambda _: reactor.stop())\n        reactor.run()\n\n\nInstallation\n------------\n\nLdaptor can be installed using the standard command line method::\n\n    python setup.py install\n\nor using pip from PyPI::\n\n    pip install ldaptor\n\nLinux distributions may also have ready packaged versions of Ldaptor and Twisted. Debian and Ubuntu have quality Ldaptor packages that can be installed e.g., by::\n\n    apt-get install python-ldaptor\n\nTo run the LDAP server (bind port 38942) from a repo checkout with\nthe project installed::\n\n    twistd -n --pidfile=ldapserver.pid --logfile=ldapserver.log \\\n        -y test-ldapserver.tac\n\nDependencies:\n\n- `Twisted[tls] \u003chttps://pypi.python.org/pypi/Twisted/\u003e`_\n- `pyparsing \u003chttps://pypi.python.org/pypi/pyparsing/\u003e`_\n- `passlib \u003chttps://pypi.python.org/pypi/passlib/\u003e`_ for Samba passwords\n- `six \u003chttps://pypi.python.org/pypi/six/\u003e`_ for simultaneous Python 2 and 3 compatability\n- `zope.interface \u003chttps://pypi.python.org/pypi/zope.interface/\u003e`_ to register implementers of Twisted interfaces\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwisted%2Fldaptor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwisted%2Fldaptor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwisted%2Fldaptor/lists"}