interface documentation

Pythonic API for LDAP object access and modification. >>> o=LDAPEntry(client=ldapclient.LDAPClient(), ... dn='cn=foo,dc=example,dc=com', ... attributes={'anAttribute': ['itsValue', 'secondValue'], ... 'onemore': ['aValue'], ... }) >>> o LDAPEntry(dn='cn=foo,dc=example,dc=com', attributes={'anAttribute': ['itsValue', 'secondValue'], 'onemore': ['aValue']})

Method __contains__ TODO
Method __eq__ Comparison. Only equality is supported.
Method __getitem__ Get all values of an attribute.
Method __len__ TODO
Method __ne__ Inequality comparison. See L{__eq__}.
Method __nonzero__ Always return True
Method __str__ Stringify as LDIF.
Method bind Try to authenticate with given secret.
Method get Get all values of an attribute.
Method has_key TODO
Method items TODO
Method keys TODO
def __contains__(self, key): (source)

TODO

def __eq__(self, other): (source)

Comparison. Only equality is supported. >>> client=ldapclient.LDAPClient() >>> a=LDAPEntry(client=client, ... dn='dc=example,dc=com') >>> b=LDAPEntry(client=client, ... dn='dc=example,dc=com') >>> a==b 1 >>> c=LDAPEntry(client=ldapclient.LDAPClient(), ... dn='ou=different,dc=example,dc=com') >>> a==c 0 Comparison does not consider the client of the object. >>> anotherClient=ldapclient.LDAPClient() >>> d=LDAPEntry(client=anotherClient, ... dn='dc=example,dc=com') >>> a==d 1

def __getitem__(self, key): (source)

Get all values of an attribute. >>> o=LDAPEntry(client=ldapclient.LDAPClient(), ... dn='cn=foo,dc=example,dc=com', ... attributes={'anAttribute': ['itsValue']}) >>> o['anAttribute'] ['itsValue']

def __len__(self): (source)

TODO

def __ne__(self, other): (source)

Inequality comparison. See L{__eq__}.

def __nonzero__(self): (source)

Always return True

def __str__(self): (source)

Stringify as LDIF. >>> o=LDAPEntry(client=ldapclient.LDAPClient(), ... dn='cn=foo,dc=example,dc=com', ... attributes={'anAttribute': ['itsValue', 'secondValue'], ... 'onemore': ['aValue'], ... }) >>> # must use rstrip or doctests won't like it due to the empty line >>> # you can just say "print o" >>> print str(o).rstrip() dn: cn=foo,dc=example,dc=com anAttribute: itsValue anAttribute: secondValue onemore: aValue

def bind(self, password): (source)

Try to authenticate with given secret. @return: Deferred ILDAPEntry (that is, self). @raise ldaperrors.LDAPInvalidCredentials: password was incorrect.

def get(self, key, default=None): (source)

Get all values of an attribute. >>> o=LDAPEntry(client=ldapclient.LDAPClient(), ... dn='cn=foo,dc=example,dc=com', ... attributes={'anAttribute': ['itsValue']}) >>> o.get('anAttribute') ['itsValue'] >>> o.get('foo') >>> o.get('foo', []) []

def has_key(self, key): (source)

TODO

def items(self): (source)

TODO

def keys(self): (source)

TODO