{ "info": { "author": "Michael Henry a.k.a. neoCrimeLabs", "author_email": "mhenry@neocri.me", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Topic :: System :: Systems Administration :: Authentication/Directory :: LDAP" ], "description": "==============================\npython-ldap_paged_search 0.4.1\n==============================\n\nSummary\n=======\n\nldap_paged_search is a python library to easily perform LDAP queries with more\nthan 1000 results, or to break down queries into smaller result sets to reduce\nserver loads.\n\nMany LDAP servers, such as active directory, will not return more than 1000\nresults unless paged requests are used. The existing python ldap library does\nsupport pageing, but requires some not very intuitive coding to perform it.\nThis library is simply a wrapper to make paged searches easy.\n\nIts interface is also slightly easier to perform queries than the LDAP library\nit wraps.\n\nRequirements\n============\n\n* Tested on python 2.8\n* Default python library includes ldap library\n\nInstallation\n============\n\nVia pip or easy_install\n-----------------------\n\n.. code:: bash\n\n $ sudo pip install ldap_paged_search # If you prefer PIP\n\n $ sudo easy_install ldap_paged_search # If you prefer easy_install\n\nManual installation\n-------------------\n\n.. code:: bash\n\n $ git clone https://github.com/neoCrimeLabs/python-ldap_paged_search.git\n $ cd python-ldap_paged_search\n $ sudo python setup.py install\n\nUsage\n=====\n\nInitial setup\n-------------\n\n.. code:: python\n\n from ldap_paged_search import LdapPagedSearch\n\n # Required values\n url = 'ldap://your.ldap.server'\n username = 'username' # for anything but active directory\n username = 'domain\\\\user' # for active directory\n password = 'yourPassword'\n\n baseDN = 'dc=company,dc=com'\n searchFilter = '(&(objectCategory=user))'\n\n # Optional values\n maxPages = 0 # 0 = everything\n maxPages = 10 # Return first 10 pages only\n\n attributes = ['*'] # Return all fields\n attributes = ['FieldName', 'AnotherField'] # Return specific fields only\n \n\n pageSize = 1000 # How many records per page\n # Usual max is 1000; check your LDAP server docs\n\nDefining a callback method\n--------------------------\n\n.. code:: python\n\n # Using a callback method to process results uses less memory on large queries\n # Not using a callback search() will return all results as a single list\n\n def myCallback(dn,record):\n print dn, record\n\nQuery using 'with'\n------------------\n\n.. code:: python\n\n # maxPages, pageSize, attributes, and callback are all OPTIONAL\n\n with LdapPagedSearch(url, username, password, maxPages=2, pageSize=2 ) as l:\n results = l.search(baseDN, searchFilter, attributes = attributes, callback = myCallback)\n\n\nAlternative query method\n------------------------\n\n.. code:: python\n\n # maxPages, pageSize, attributes, and callback are all OPTIONAL\n\n l = LdapPagedSearch(url, username, password, maxPages=2, pageSize=2 )\n results = l.search(baseDN, searchFilter, attributes = attributes, callback = myCallback)\n \n\nResults format\n--------------\n\n.. code:: python\n\n # If you don't set a callback, your results will be returned as follows\n\n [\n ('DistinctName1',\n { 'FieldName': ['value1', 'value2'],\n 'AnotherField': ['value'], }),\n ('DistinctName2',\n { 'FieldName': ['value1', 'value2'],\n 'AnotherField': ['value'], }),\n ...\n ]\n\nConditions of Use\n=================\n\nI wrote this library for my own use, but realized others may find it useful as\nthere were many forum topics describing this problem.\n\nUnfortunately I cannot guarentee any active support, but will do my best as time\npermits. That said, I'll happily accept push requests with suitable changes\nthat address the general audience of this library.\n\nPut simply, use this at your own risk. If it works, great! If not, I may not\nbe able to help you. If you fix anything, however, please push it back and I'll\nlikely accept it. :-)\n\nAlso, if you use this library in your package, tool, or comercial software, let\nme know, and I'll list it here!", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/neoCrimeLabs/python-ldap_paged_search", "keywords": null, "license": "LGPLv2.1", "maintainer": null, "maintainer_email": null, "name": "ldap_paged_search", "package_url": "https://pypi.org/project/ldap_paged_search/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/ldap_paged_search/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/neoCrimeLabs/python-ldap_paged_search" }, "release_url": "https://pypi.org/project/ldap_paged_search/0.4.2/", "requires_dist": null, "requires_python": null, "summary": "Easily perform LDAP queries with more than 1000 results", "version": "0.4.2" }, "last_serial": 1247064, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "a81c9f942d39ac9e144756312a83cb5a", "sha256": "73846cdd324a851e9a4b981560d64c09119ada6789c68b39346d08b11b68cb5f" }, "downloads": -1, "filename": "ldap_paged_search-0.1.tar.gz", "has_sig": false, "md5_digest": "a81c9f942d39ac9e144756312a83cb5a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3751, "upload_time": "2014-08-12T17:28:43", "url": "https://files.pythonhosted.org/packages/a8/69/5b29686e87c345f884ae261266cf66a17687158edab37e2336b46f7c1bf3/ldap_paged_search-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "0f546b8d0f8224684465fb41102a6ad9", "sha256": "7eba1ab3b17127c9a2e230fc4e766f7d69c696017b5d39b15c4d4ff6ed6b69a6" }, "downloads": -1, "filename": "ldap_paged_search-0.2.tar.gz", "has_sig": false, "md5_digest": "0f546b8d0f8224684465fb41102a6ad9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3747, "upload_time": "2014-08-12T17:38:52", "url": "https://files.pythonhosted.org/packages/d6/17/574f2ac0f2a4d97f53b479be81a510260de5b4f88e5c7961af9fd605bd64/ldap_paged_search-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "c1aec8cde3b0370d95d59cb4887c7597", "sha256": "a37ddbc6921ceaf8865ba7983ae80073b2b967fbd3f61869e59ba27212ac4dc2" }, "downloads": -1, "filename": "ldap_paged_search-0.3.tar.gz", "has_sig": false, "md5_digest": "c1aec8cde3b0370d95d59cb4887c7597", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3791, "upload_time": "2014-08-12T17:47:04", "url": "https://files.pythonhosted.org/packages/27/4e/f66523abd322d3b1fc8203d406e2a17e91a304d470c5962a84134e81980f/ldap_paged_search-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "f4b66c518f618fa57065462a3bd5460f", "sha256": "98b2aeb699a574156eff1606f27aebaad9aa281c35e17af804e1f0d835ec695e" }, "downloads": -1, "filename": "ldap_paged_search-0.4.tar.gz", "has_sig": false, "md5_digest": "f4b66c518f618fa57065462a3bd5460f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14141, "upload_time": "2014-08-13T20:01:18", "url": "https://files.pythonhosted.org/packages/1a/65/43874a5f542e11be1e782c05e56de9218802671e7ab69d11a7bc035daa28/ldap_paged_search-0.4.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "91fc6f3bd483bd9b6713e1aa1a420a30", "sha256": "98a7c85dfbaf0f6543cfb60fa1a103724ac0468d81d58239514369a02be8511e" }, "downloads": -1, "filename": "ldap_paged_search-0.4.1.tar.gz", "has_sig": false, "md5_digest": "91fc6f3bd483bd9b6713e1aa1a420a30", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14148, "upload_time": "2014-08-25T20:59:58", "url": "https://files.pythonhosted.org/packages/10/12/d17c31c3b4e91a3750e3db05ed5379e6fc895d483b13f446f474092f54d6/ldap_paged_search-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "15c15ed08ed0a0b9d162597b9991301b", "sha256": "1c1ff1150f4ae3efd5a2784c53661278acf4d7cc00e127199db8c37f98d818ca" }, "downloads": -1, "filename": "ldap_paged_search-0.4.2.tar.gz", "has_sig": false, "md5_digest": "15c15ed08ed0a0b9d162597b9991301b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14163, "upload_time": "2014-10-03T16:54:00", "url": "https://files.pythonhosted.org/packages/da/f2/e81043a74d4d59387297340eecc5cdb401a7b51990355f46d0a1d1033c0e/ldap_paged_search-0.4.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "15c15ed08ed0a0b9d162597b9991301b", "sha256": "1c1ff1150f4ae3efd5a2784c53661278acf4d7cc00e127199db8c37f98d818ca" }, "downloads": -1, "filename": "ldap_paged_search-0.4.2.tar.gz", "has_sig": false, "md5_digest": "15c15ed08ed0a0b9d162597b9991301b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 14163, "upload_time": "2014-10-03T16:54:00", "url": "https://files.pythonhosted.org/packages/da/f2/e81043a74d4d59387297340eecc5cdb401a7b51990355f46d0a1d1033c0e/ldap_paged_search-0.4.2.tar.gz" } ] }