[python-ldap] Fwd: Pagination in python-ldap 2.4

Adam Tauno Williams awilliam at whitemice.org
Tue Dec 29 11:09:11 EST 2015

On Mon, 2015-12-28 at 18:58 -0800, John Theodore wrote:
> I found some examples online, but they all seem to be for python-ldap 
> 2.3, and the code they used is deprecated.
> Can someone give me a simple example of querying for results beyond
> the size limit?
> This is the search I want to do: results =
> ldap_obj.search_s('ou=people,blahblah,dc=com', ldap.SCOPE_SUBTREE,
> filterstr='(id=*)', attrlist='mail')
> Though there are 18k results, but the size limit is 10k. How can I
> use python-ldap with paged results to get all the results?
> I looked at the docs a bit and found
> ldap.controls.libldap.SimplePagedResultsControl, though I'm confused
> on how to use this properly.

Example - https://sourceforge.net/p/coils/coils-code/ci/master/tree/coi

Adam Tauno Williams <mailto:awilliam at whitemice.org> GPG D95ED383
OpenGroupware Developer <http://www.opengroupware.us/>

More information about the python-ldap mailing list