Home | Trees | Indices | Help |
|
---|
|
zope.interface.Interface --+ | ILDAPEntry
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']})
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
_InterfaceClass__attrs =
|
|||
__bases__ =
|
|||
__identifier__ =
|
|||
__iro__ =
|
|||
__name__ =
|
|||
__sro__ =
|
|||
_implied =
|
|||
dependents = <WeakKeyDictionary at 139824190473856>
|
|||
Inherited from |
|
Get all values of an attribute. >>> o=LDAPEntry(client=ldapclient.LDAPClient(), ... dn='cn=foo,dc=example,dc=com', ... attributes={'anAttribute': ['itsValue']}) >>> o['anAttribute'] ['itsValue'] |
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', []) [] |
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 |
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 |
Inequality comparison. See __eq__. |
Try to authenticate with given secret.
|
|
_InterfaceClass__attrs
|
__iro__
|
__sro__
|
_implied
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Sun Nov 29 13:55:24 2015 | http://epydoc.sourceforge.net |