[python3-ldap] python3-ldap 0.8.1 released!

python3ldap python3ldap at gmail.com
Sun Feb 9 22:50:47 CET 2014


Hello everybody,
I've released the 0.8.1 version of python3-ldap. It include a new
package, 'abstraction' with
an abstraction layer for LDAP. It's a tools I used on a previous
project that I have elaborated to be of more general use, limited to
search, for now.

WIth the abstraction layer you can specify definition for ldap object
and anttributes with pre and post validation at attribute level. You
can even dereference an attribute containing a DN with an object of
the relevant type. (For example searching for a group you get the
'member' attribute populated with the whole entries of member, not
only the DN).

It has a simplified query language for writing filters that resemble a
dictionary that should be much more simple to use than the LDAP filter
syntax. For example to search for a cn of bob or john and a surname
starting with 'sm' you could use: 'CommonName: bob;john, Surname:sm*).

I find the abstraction layer is quite useful at the interactive
prompt, Look at the documentation for a better explanation of its
features, and let me know what you think about it.

Another feature included in 0.8 is the context manager for the
Connection object. Now if you use:

with Connection(...) as c:
     c.search(...)

the connection is automatically opened, bound and closed even if you
have an exception in the code inside the 'with'.


0.8 includes additional feature/fix, this is from the changelog::

* 0.8,1
    - Changed exception returned by the library to LDAPException, a
subclass of Exception.

* 0.8.0 - 2014.02.08
    - Added abstraction layer (for searching)
    - Added context manager to Connection class
    - Added readOnly parameter to Connection class
    - Fixed a bug in search with 'less than' (<=) parameter
    - Remove validation of available SSL protocols because different
Python interpreters can use different ssl packages

Have fun,
Giovanni


More information about the python3-ldap mailing list