types-ldap3
Typing stubs for ldap3
What it is and what it does
types-ldap3 is a type stub package from the typeshed project that provides type annotations for the ldap3 library. It allows static type checkers like mypy and pyright to understand and validate code that uses ldap3 for LDAP directory operations, catching type errors before runtime.
The package is a pure-Python stub-only distribution with no runtime code. It targets ldap3 version 2.9.* and has been tested with mypy 2.1.0 and pyright 1.1.409. Installation is lightweight, requiring only types-pyasn1 as a runtime dependency. It is actively maintained through the typeshed project and receives regular updates.
Use it for:
- Enable mypy or pyright to type-check code that queries LDAP directories via ldap3
- Catch type mismatches in ldap3 connection parameters and search filters before deployment
- Support IDE autocomplete and inline type hints for ldap3 API calls
- Validate LDAP authentication and directory binding code in type-strict projects
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type stubs for the ldap3 package, enabling static type checkers like mypy and pyright to validate code that uses ldap3 for LDAP directory operations.
Yes, if you use ldap3 and run static type checking. Install it alongside ldap3 to get type validation and IDE support. It has no runtime overhead, low friction, and is actively maintained. If you do not use a type checker or do not use ldap3, it provides no value.
Install
types-ldap3 on PyPI
pip
pip install types-ldap3uv
uv add types-ldap3poetry
poetry add types-ldap3Installing types-ldap3
Before you install
Low install friction; a pure-Python stub package with minimal dependencies (only types-pyasn1). Actively maintained as part of typeshed, with recent releases and no known vulnerabilities.
License in practice
Apache-2.0 permissive license allows use in most projects without restriction, including commercial and proprietary software.
Quickstart
pip install types-ldap3
# In your Python code with mypy or pyright enabled:
import ldap3
conn: ldap3.Connection = ldap3.Server('ldap://example.com')
Requires Python 3.10 or later; only provides type information, does not replace the ldap3 package itself.
Verify before relying
- Whether type coverage is complete for all ldap3 2.9.* APIs or if gaps remain
- Compatibility with ldap3 versions outside the 2.9.* range
Package facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — types-pyasn1 |
| Maintenance | actively maintained — 88 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 462,243/month — #6,527 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_ldap3-2.9.13.20260518-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
types-polibProvides type stubs for the polib package,…
permissive · top 15,000 on PyPI
python3-ldapThis package is a redirect to ldap3—a pure…
copyleft · top 15,000 on PyPI
ldap3ldap3 is a pure Python LDAP V3 client library…
copyleft · top 5,000 on PyPI
types-qrcodeProvides type stubs for the qrcode package,…
permissive · top 15,000 on PyPI
types-netaddrProvides type stubs for the netaddr package,…
permissive · top 15,000 on PyPI
types-shapelyProvides type stubs for the shapely package,…
permissive · top 15,000 on PyPI
types-tomlProvides type hints for the toml package,…
permissive · top 1,000 on PyPI
types-PySocksProvides type stubs for PySocks, enabling…
permissive · top 15,000 on PyPI
types-pysftpProvides type hints for the pysftp package,…
permissive · top 15,000 on PyPI
types-pyflakesProvides type stubs for the pyflakes static…
permissive · top 15,000 on PyPI