Ldap utils library.
Project description
ldaputils
Ldap utils library.
Install
pip install ldaputils
Usage
# use your own host, port, username and password values.
# username must be a fully qualified dn.
# Use ipython help to see more init parameters.
server = LdapService(
host="localhost,
port=389,
username="cn=admin,dc=example,dc=com",
password="adminpassword",
)
name = nameutils.get_random_name() # use fastutils.nameutils.get_random_name for test
username = pinyinutils.to_pinyin(name).lower()
user_detail = {
"cn": name,
"ou": "AI Tech Group",
"l": "HangZhou, China",
}
assert self.server.add_user_entry(username, user_detail)
assert self.server.delete_user_entry(username)
Releases
v0.1.0 2020/11/14
- First release.
- Add, update, delete user entry function ready.
- Get user and get users function ready.
v0.1.4 2020/11/17
- Add util functions.
v0.1.5 2020/11/21
- Add attributes param for LdapService.get_user_entries.
v0.1.7 2021/03/24
- Fix add_user_entry changed the user_detail dict problem.
v0.1.8 2023/09/15
- Doc update.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ldaputils-0.1.8.tar.gz
(5.9 kB
view details)
Built Distribution
File details
Details for the file ldaputils-0.1.8.tar.gz
.
File metadata
- Download URL: ldaputils-0.1.8.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43050b154446d80acbd4e8a9c7b54b28a009b2a8b8c2b35089cfc0151c9d987a |
|
MD5 | 69a00d24b7de5269b7370f979ce5a784 |
|
BLAKE2b-256 | 55d0f14b914c84561981198a26096c65aab058ee9d443e97cbfe2040296aa3c2 |
File details
Details for the file ldaputils-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: ldaputils-0.1.8-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d75468de52a0b90215c4f740b91b0f08161973863f725c13c3daab58ea04b9d9 |
|
MD5 | a64a42fab9ed8daae71569e1cd4c2342 |
|
BLAKE2b-256 | 76831d2cbbcc50f1d43c567523baccae4f66f84c7de38c9af296c35fff0a0aba |