hello everybody

Łukasz Mierzwa lukasz.mierzwa at redefine.pl
Wed Sep 9 10:31:14 CEST 2009

Dnia wtorek, 8 września 2009 o 11:24:44 Michael Ströder napisał(a):
> Łukasz,
> Łukasz Mierzwa wrote:
> > I'm writing LDAP library (ORM without R as I call it) for python, it's
> > using python-ldap to do the hard work and let You manage LDAP entries in
> > more ORM style.
> I don't have the spare time to look more closely at it not to speak of
>  really contributing to it. So just a few general hints:
> 1. You're not the first one implementing such a module on top of
>  python-ldap. You might want to dig the mailing list's archive to find
>  others.
> 2. Most implementations of higher-level APIs fall short with mapping
>  attribute type descriptors (OIDs or NAME) to Python class attribute names
>  since they ignore the fact that there are sub-types defined in LDAP
>  (;binary and language sub-types such as ;de-DE). Also there does not have
>  to be a NAME in an attribute type description. So raw OIDs might be
>  returned in a LDAP search result.
> 3. No implementation is dealing correctly with attribute type descriptor
> aliasing with OIDs and several values for NAME. You might want to look at
> ldap.schema.models.Entry to get an idea.
> Ciao, Michael.

I think that my approach is a little bit different than others, I'm not trying 
to make a tool that will automatically map LDAP object with all its attributes 
to a python object, I'm aiming at solution where:

1. there is no magic, nothing happens without You knowing it, no auto mapping 
attributes from LDAP to python
2. we assume that user know what schema is defined on the server, it's not 
designed for cases where You first discover what is stored on server side and 
then adapt
3. server stores standardized data, this means that if You store user 300 
accounts, all of them are using the same set of object classes 
4. user to writes models and he describes what object classes and attributes 
he is going to use in those models
5. user models needs to follow server schema, if they don't he is going to get 
exception before anything happens

I don't need a solution for browsing LDAP data and dealing with every type of 
attribute that can be defined, I need a tool to easily work with large set of 
unified objects (like user accounts), creating user model with set of methods 
to deal with user accounts seems to me like a good way of doing this.

Łukasz Mierzwa

More information about the python-ldap mailing list