Skip to main content

ldappool

A simple connector pool for python ldap3 library.

The pool keeps LDAP connectors alive and let you reuse them, drastically reducing the time spent to initiate a ldap connection.

The pool has useful features like:

  • transparent reconnection on failures or server restarts
  • configurable pool size and connectors timeouts
  • configurable max lifetime for connectors
  • a context manager to simplify acquiring and releasing a connector

Quickstart ::::::::::

To work with the pool, you just need to create it, then use it as a context manager with the connection method::

    from ldappool3 import LDAPConnectionPool3

    cm = LDAPConnectionPool3(server_url='ldap://localhost', user='user@example.com', password='password123')


    with cm.acquire() as conn:
        conn.search(search_base='DC=EXAMPLE,DC=COM' search_filter='(sAMAccountName=some.user)')

        response = conn.entries

The connector returned by connection is a LDAPObject, that's binded to the server. See https://pypi.org/project/python-ldap/ for details on how to use a connector.

It is possible to check the state of the pool by representing the pool as a string::

from ldappool3 import LDAPConnectionPool3

cm = LDAPConnectionPool3(server_url='ldap://localhost', user='user@example.com', password='password123')

.. do something with cm ..

print(cm)

This will result in output similar to this table::

ldap://localhost:389 - cleartext - user: user@example.com - not lazy - bound - open - <local: localhost:50277 - remote: localhost:389> - tls not started - listening - SyncStrategy - internal decoder
ldap://localhost:389 - cleartext - user: user@example.com - not lazy - bound - open - <local: localhost:59583 - remote: localhost:389> - tls not started - listening - SyncStrategy - internal decoder
ldap://localhost:389 - cleartext - user: user@example.com - not lazy - bound - open - <local: localhost:34709 - remote: localhost:389> - tls not started - listening - SyncStrategy - internal decoder
ldap://localhost:389 - cleartext - user: user@example.com - not lazy - bound - open - <local: localhost:41755 - remote: localhost:389> - tls not started - listening - SyncStrategy - internal decoder
ldap://localhost:389 - cleartext - user: user@example.com - not lazy - bound - open - <local: localhost:56227 - remote: localhost:389> - tls not started - listening - SyncStrategy - internal decoder

LDAPConnectionPool3 options :::::::::::::::::::::::::

Here are the options you can use when instanciating the pool:

  • server_url: ldap server uri [mandatory]
  • user: default bind that will be used to bind a connector.
  • passwd: default password that will be used to bind a connector.
  • user: pool size. default: 5
  • use_pool: activates the pool. If False, will recreate a connector each time. default: True

The uri option can be ldap://server or ldaps://server. If you use ldaps://, the connection will use ssl for encrytpion. The server will perform some operations only in a ssl connection.

Metadata

Release files for ldappool3 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ldappool3 0.0.7
File Size Uploaded Provenance Actions
ldappool3-0.0.7.tar.gz 5.6 kB With provenance Details for ldappool3-0.0.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ldappool3 0.0.7
File Interpreter ABI Platform Actions
ldappool3-0.0.7-py3-none-any.whl Python 3 none any Details for ldappool3-0.0.7-py3-none-any.whl

Total release size: 11.3 kB

Release files / ldappool3-0.0.7.tar.gz

Download URL ldappool3-0.0.7.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a6a95e4208295931dc524328a08fcafa627ad2d799eeaf0b2aa6d15424c2fdb8
BLAKE2b-256 checksum
How to use checksums
9ea1d15f68dc93906190694057af451a8691532da8882c4981269342c0724116
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 2, 2026.

Transparency log

Release files / ldappool3-0.0.7-py3-none-any.whl

Download URL ldappool3-0.0.7-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
64ba93a7a1711b1c79cbe37ea0b74b45cab8aecd427de2fe82ebae7e88819981
BLAKE2b-256 checksum
How to use checksums
92aa3ad8b69471d6cced8d519afbb93553b565360dd4d3995ed7071b44070ebc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 2, 2026.

Transparency log

Security for ldappool3 0.0.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ldappool3-0.0.7.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 2, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page