aioldap
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.
Documentation
Eventually will be on readthedocs
Example
Simple example of using aioboto3 to put items into a dynamodb table
conn = aioldap.LDAPConnection()
await conn.bind(
bind_dn=ldap_params['user'],
bind_pw=ldap_params['password'],
host=ldap_params['host'],
port=ldap_params['port']
)
dn = user_entry('modify', ldap_params['test_ou1'])
await conn.add(
dn=dn,
object_class='inetOrgPerson',
attributes={'description': 'some desc', 'cn': 'some_user', 'sn': 'some user', 'employeeType': ['type1', 'type2']}
)
await conn.modify(
dn=dn,
changes={
'sn': [('MODIFY_REPLACE', 'some other user')],
'employeeType': [
('MODIFY_ADD', 'type3'),
('MODIFY_DELETE', 'type1'),
]
}
)
# Now search for user
async for user in conn.search(dn, search_filter='(uid=*)', search_scope='BASE', attributes='*'):
assert user['dn'] == dn
Credits
All of the credit goes to @cannatag who literally had done all of the hard work for me.
Metadata
Release files for aioldap 0.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| aioldap-0.4.3.tar.gz | 25.6 kB | Without provenance | Details for aioldap-0.4.3.tar.gz |
Release files / aioldap-0.4.3.tar.gz
| Download URL | aioldap-0.4.3.tar.gz |
|---|---|
| Size | 25.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cc82a6234c67f22eb31c430f8c4b160aa28ed03157d0ffd5a92151d0b5f124a0
|
|
BLAKE2b-256 checksum How to use checksums |
e20e45d1dfd9555cae84aca3957ebf53549ca931c091fcd0af9785d9825726cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.5.0.1 requests/2.24.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.5
|
Security for aioldap 0.4.3
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.