Title: add ldappool module by michaelalang · Pull Request #582 · python-ldap/python-ldap · GitHub
Open Graph Title: add ldappool module by michaelalang · Pull Request #582 · python-ldap/python-ldap
X Title: add ldappool module by michaelalang · Pull Request #582 · python-ldap/python-ldap
Description: I would like to add ldappooling capability to the library. LDAP Pooling example entries as dict from ldappool import ConnectionPool pool = ConnectionPool( params={"keep": True, "autoBind": True, "retries": 2}, max=5) pool.set_uri("ldaps://ldap.example.com:636/dc=example,dc=com?uid,mail?sub?(|(uid=test)(mail=test@example.com))") pool.set_credentials("binddn", "bindpw") with pool.get() as conn: for entry in conn.search_s(pool.basedn, pool.scope, pool.filter, pool.attributes): print(f"{entry[0]}: {entry[1].get('uid')} {entry[1].get('mail')}") for member in entry[1].get("memberOf", []): print(member) changing the connection or credentials for the pool from ldappool import ConnectionPool from ldappool import e2c pool = ConnectionPool( 40,0-1 13% params={"keep": True, "autoBind": True, "retries": 2}, max=5) pool.set_uri("ldaps://ldap.example.com:636/dc=example,dc=com?uid,mail?sub?(|(uid=test)(mail=test@example.com))") pool.set_credentials("binddn", "bindpw") with pool.get() as conn: for entry in map(e2c, conn.search_s(pool.basedn, pool.scope, pool.filter, pool.attributes)): print(f"{entry.dn}: {entry.uid} {entry.mail}") pool.set_credentials(entry.dn, "changeme") with pool.get() as conn: for entry in map(e2c, conn.search_s(pool.basedn, pool.scope, pool.filter, pool.attributes)): print(f"{entry.dn}: {entry.uid} {entry.mail}")
Open Graph Description: I would like to add ldappooling capability to the library. LDAP Pooling example entries as dict from ldappool import ConnectionPool pool = ConnectionPool( params={"keep": True, &q...
X Description: I would like to add ldappooling capability to the library. LDAP Pooling example entries as dict from ldappool import ConnectionPool pool = ConnectionPool( params={"keep": ...
Opengraph URL: https://github.com/python-ldap/python-ldap/pull/582
X: @github
Domain: patch-diff.githubusercontent.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:70d06759-6662-274d-f4d1-a071539108bd |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | A2C8:12A68A:CA0F60:107CE21:69769D3E |
| html-safe-nonce | 9ce126ae6b342c9c089943b0e90489cd0224993f6bfdfc0cb5c274a6387a0a6c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMkM4OjEyQTY4QTpDQTBGNjA6MTA3Q0UyMTo2OTc2OUQzRSIsInZpc2l0b3JfaWQiOiI2MTE0NTI2ODIxMTcwNDUzODIyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 669bf576ca35fe31cdd454464c64354ace6e6e2c9fa6c5d003cd0b5b37a81f76 |
| hovercard-subject-tag | pull_request:2295265976 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python-ldap/python-ldap/pull/582/checks |
| twitter:image | https://avatars.githubusercontent.com/u/94735640?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/94735640?s=400&v=4 |
| og:image:alt | I would like to add ldappooling capability to the library. LDAP Pooling example entries as dict from ldappool import ConnectionPool pool = ConnectionPool( params={"keep": True, &q... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 032152924a283b83384255d9489e7b93b54ba01da8d380b05ecd3953b3212411 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-ldap/python-ldap git https://github.com/python-ldap/python-ldap.git |
| octolytics-dimension-user_id | 33895877 |
| octolytics-dimension-user_login | python-ldap |
| octolytics-dimension-repository_id | 111794776 |
| octolytics-dimension-repository_nwo | python-ldap/python-ldap |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 111794776 |
| octolytics-dimension-repository_network_root_nwo | python-ldap/python-ldap |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 5b577f6be6482e336e3c30e8daefa30144947b17 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width