dataflake.ldapconnection.connection

class dataflake.ldapconnection.connection.LDAPConnection(host='', port=389, protocol='ldap', c_factory=<class ldap.ldapobject.ReconnectLDAPObject at 0x17ec7a10>, rdn_attr='', bind_dn='', bind_pwd='', read_only=False, conn_timeout=-1, op_timeout=-1, logger=None)

LDAPConnection object

See interfaces.py for interface documentation.

addServer(host, port, protocol, conn_timeout=-1, op_timeout=-1)

Add a server definition to the list of servers used

connect(bind_dn=None, bind_pwd=None)

initialize an ldap server connection

This method returns an instance of the underlying python-ldap connection class. It does not need to be called explicitly, all other operations call it implicitly.

delete(dn, bind_dn=None, bind_pwd=None)

Delete a record

insert(base, rdn, attrs=None, bind_dn=None, bind_pwd=None)

Insert a new record

attrs is expected to be a mapping where the value may be a string or a sequence of strings. Multiple values may be expressed as a single string if the values are semicolon-delimited. Values can be marked as binary values, meaning they are not encoded as UTF-8, by appending ‘;binary’ to the key.

logger()

Get the logger

modify(dn, mod_type=None, attrs=None, bind_dn=None, bind_pwd=None)

Modify a record

removeServer(host, port, protocol)

Remove a server definition from the list of servers used

search(base, scope=2, fltr='(objectClass=*)', attrs=None, convert_filter=True, bind_dn=None, bind_pwd=None)

Search for entries in the database

Table Of Contents

Previous topic

Related links

This Page


Download as PDF