Skip to main content
Codecov Read the Docs GitHub Actions PyPI Black

anyldap is a pure-Python library that implements:

  • LDAP client logic

  • separately-accessible LDAP and BER protocol message generation/parsing

  • ASCII-format LDAP filter generation and parsing

  • LDIF format data generation

  • Samba password changing logic

Also included is a set of LDAP utilities for use from the command line.

Verbose documentation can be found on ReadTheDocs.

Quick Usage Example

import anyio

from anyldap.protocols.ldap import ldapclient, ldapconnector, ldapsyntax


async def example():
    serverip = b"192.168.128.21"
    basedn = b"dc=example,dc=com"
    binddn = b"bjensen@example.com"
    bindpw = b"secret"
    query = b"(cn=Babs*)"
    creator = ldapconnector.LDAPClientCreator(None, ldapclient.LDAPClient)
    overrides = {basedn: (serverip, 389)}
    client = await creator.connectAsync(basedn, overrides=overrides)
    await client.bind_async(binddn, bindpw)
    entry = ldapsyntax.LDAPEntry(client, basedn)
    results = await entry.search_async(filterText=query)
    for result in results:
        print(result.getLDIF())


if __name__ == "__main__":
    anyio.run(example)

Installation

anyldap can be installed using the standard command line method:

python setup.py install

or using pip from PyPI:

pip install anyldap

Linux distributions may also have ready packaged versions of anyldap. Debian and Ubuntu may provide packages that can be installed e.g., by:

apt-get install python-anyldap

For a server example from a repo checkout, see docs/source/examples/quickstart_server.py.

Dependencies:

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

anyldap-0.0.1.tar.gz (287.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anyldap-0.0.1-py3-none-any.whl (189.5 kB view details)

Uploaded Python 3

File details

Details for the file anyldap-0.0.1.tar.gz.

File metadata

  • Download URL: anyldap-0.0.1.tar.gz
  • Upload date:
  • Size: 287.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for anyldap-0.0.1.tar.gz
Algorithm Hash digest
SHA256 86f2f7e5e7b3d4c2b1dda0226ccc232b2ec9041cd8ee4eee415facd1d6a84302
MD5 9bd1ada5cd82eceb7d62452c17d7fa3d
BLAKE2b-256 96826aed27a1ac7b70394baaacfc4906e22d0b846c00ee4dd1b37083dc8a8b0d

See more details on using hashes here.

Provenance

The following attestation bundles were made for anyldap-0.0.1.tar.gz:

Publisher: main.yml on graingert/anyldap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file anyldap-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: anyldap-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 189.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for anyldap-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9993d3a9facb470ef8011de26e2351691125513f0130c054929d818a36364b94
MD5 96aeae73345b9d9fdf82b71c792a344b
BLAKE2b-256 4b0bd27759af7d6add5700a331263235dcd10dc699c1c2f4859df567e4bc47d8

See more details on using hashes here.

Provenance

The following attestation bundles were made for anyldap-0.0.1-py3-none-any.whl:

Publisher: main.yml on graingert/anyldap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page