A simple ldap object mapper for python
Project description
This python module provides a simple LDAP object mapper
License
MIT, so do what you want, but leave the copyright notice in the code
Github
Fork it!
Usage
Playing around:
>>> import ldapom >>> lc = ldapom.LdapConnection(uri='ldap://localhost:1389', base='dc=example,dc=com', login='cn=admin,dc=example,dc=com', password='admin') >>> node = lc.get_ldap_node('cn=f1ori,ou=people,dc=example,dc=com') >>> node # just show <LdapNode: cn=f1ori,ou=people,dc=example,dc=com> >>> node.givenName # show name <LdapAttribute: givenName=Richter> >>> node.givenName = 'Meier' # change givenname >>> node.save() # save all changes >>> node.delete() # delete
Create a new ldap node:
>>> node2 = lc.new_ldap_node('cn=newuser,ou=people,dc=example,dc=com') >>> node2.objectClass = ['class1', 'class2'] >>> node2.givenName = 'new' >>> node2.save()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ldapom-0.9.tar.gz
(4.9 kB
view hashes)