Skip to main content

Async ldap library sorta based off ldap3

Project description


.. image::

.. image::

.. image::
:alt: Code coverage

.. image::
:alt: Documentation Status

.. image::
:alt: Updates

Not entirely ready, literally just started. Might shuffle things around a bit etc...

This was initially going to be a complete "from scratch" LDAP library for asyncio. Having used ldap3 for quite a
while I thought: wouldn't it be nice to have something ldap3-like but using normal asyncio. So I wrote this library which
is sort of based around ldap3, it uses ldap3's encoding and decoding functions and I just dealt with the actual packet
handoff. As as for why I made this, well because I can... and because I was bored.

I wouldn't quite call this production ready yet, and it could do with a bit of cleaning up but if anyone actually
finds this library useful, raise an issue with anything you have and I'll be happy to help out.

In its current form it only supports Python3.6 as I have an async generator in the code, am looking at making it
Python3.5 compatible too.

Eventually will be on readthedocs


Simple example of using aioboto3 to put items into a dynamodb table

.. code-block:: python
conn = aioldap.LDAPConnection()
await conn.bind(

dn = user_entry('modify', ldap_params['test_ou1'])
await conn.add(
attributes={'description': 'some desc', 'cn': 'some_user', 'sn': 'some user', 'employeeType': ['type1', 'type2']}

await conn.modify(
'sn': [('MODIFY_REPLACE', 'some other user')],
'employeeType': [
('MODIFY_ADD', 'type3'),
('MODIFY_DELETE', 'type1'),

# Now search for user
async for user in, search_filter='(uid=*)', search_scope='BASE', attributes='*'):
assert user['dn'] == dn


All of the credit goes to @cannatag who literally had done all of the hard work for me.

Project details

Download files

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

Files for aioldap, version 0.4.2
Filename, size File type Python version Upload date Hashes
Filename, size aioldap-0.4.2-py3-none-any.whl (9.0 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size aioldap-0.4.2.tar.gz (24.7 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page