Skip to main content

'Client library for fast+easy access and manipulation of an LDAP directory-information-tree(DIT).'

Project description


ldap_hopper is a small Python3 package that allows you to easily navigate and manipulate an LDAP directory-information-tree(DIT). It neatly wraps around the standard ldap package and takes away all the nasty bits and pieces of boiler-plating, while making your code more readable.


pip install ldap_hopper


#!/usr/bin/env python3
from ldap_hopper import Config, Cursor

# define an access configuration
config = Config(
#    bind_dn='',
#    bind_pw='',
#    use_tls=True,

# creating a cursor
root = Cursor(config)

# traversal via standard generators
[child for child in root.children]
[sub for sub in root.subtree]

# adding a child node
dn = 'ou=crew,dc=example,dc=com'
attrs = {
    'objectClass': ['organizationalUnit'],
    'ou': ['crew'],
cursor = root.add(dn, attrs)

# searching defaults to ldap.SCOPE_SUBTREE
[result for result in'ou=crew')]

from ldap_hopper import Scope
[r for r in'objectClass=*', Scope.onelevel)]

# manipulating attributes
cursor.attrs['description'] = 'Lorem ipsum...'
del cursor.attrs['desciption']

# deleting an entire object


git clone
cd ldap_hopper
pipenv install --dev


PyPi :

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ldap_hopper-3.3.7.tar.gz (28.2 kB view hashes)

Uploaded source

Built Distribution

ldap_hopper-3.3.7-py3-none-any.whl (8.8 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page