A module that makes simple LDAP usage simple.
Project description
About
A small wrapper around the python-ldap library that provides a more Pythonic interface for LDAP server connections, LDAP objects, and the common get and search operations.
Example
A quick and easy example using simpleldap:
>>> import simpleldap
>>> conn = simpleldap.Connection('directory.example.com')
>>> user = conn.get("uid=myuser")
>>> user.dn
'uid=myuser,dc=directory,dc=example,dc=com'
>>> user['cn']
['Joe Smith', 'Joe M. Smith']
>>> user.first('cn')
'Joe Smith'
>>> conn.close()
The Connection object can also be used as a context manager, e.g.:
with simpleldap.Connection('directory.example.com') as conn:
users = conn.search("(&(givenName=Joe)(sn=Smith))")
Installation
Install using pip:
pip install simpleldap
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
simpleldap-0.7.tar.gz
(9.1 kB
view details)
File details
Details for the file simpleldap-0.7.tar.gz.
File metadata
- Download URL: simpleldap-0.7.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
986c582ad8f6ffdb79944fca311eff98afebb611790d43bc4050ce44c9308dc8
|
|
| MD5 |
9041fbfeda984f1a5a29b036aea1bcaa
|
|
| BLAKE2b-256 |
20ed58670d9cf6424edf4947c1c302f7e3c1c44e71c4f2fc406964d06045ccbb
|