Skip to main content

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.

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.0.tar.gz (5.2 kB view details)

Uploaded Source

File details

Details for the file ldaputils-0.1.0.tar.gz.

File metadata

  • Download URL: ldaputils-0.1.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/39.2.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.6.8

File hashes

Hashes for ldaputils-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0ba451c53946c7b86df925749112eed7000194fea8d22b8a50a4c4394912530c
MD5 fabc9724dcca0dae7c793c58dc5a8bb2
BLAKE2b-256 0ab01607f1c8ccde42245cba476981b03626d8bff2af190e62d2f44d7f85305c

See more details on using hashes here.

Supported by

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