CSH LDAP ORM
Project description
csh_ldap
Python 3 ORM for CSH LDAP
Installation
pip install csh_ldap
Usage
import csh_ldap
# Create an unbatched instance
instance = csh_ldap.CSHLDAP(bind_dn, bind_pw)
# Create an batched instance
instance_batched = csh_ldap.CSHLDAP(bind_dn, bind_pw, batch_mods=True)
# Create a Read-Only instance that will only echo your changes
instance_ro = csh_ldap.CSHLDAP(bind_dn, bind_pw, ro=True)
# Get member by UUID
liam = instance.get_member(uuid_of_liam)
# Get member by UID
liam = instance.get_member(uid_of_liam, uid=True)
# Get member by iButton ID
liam = instance.get_member_ibutton(ibutton_id)
# Get member by Slack UID
liam = instance.get_member_slackuid(slack_uid)
# Get group by cn
rtp = instance.get_group('rtp')
# Get cn of member
print(liam.cn)
# Set cn of member
liam.cn = "Liam Middlebrook"
# Setting attributes to None removes them
liam.roomNumber = None
# Process batched writes per-dn
instance_batched.flush_mod()
# Get EBoard Directorship
# Directorships: ['chairman', 'evaluations', 'financial', 'history', 'imps', 'opcomm', 'research', 'social']
social = instance.get_directorship_heads('social')
for director in social:
# Directorships are always lists, since it can be multiple people.
print(director.cn)
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
csh_ldap-2.5.3.tar.gz
(9.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file csh_ldap-2.5.3.tar.gz.
File metadata
- Download URL: csh_ldap-2.5.3.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1401d93b55a6979142ff310b162cc087415fc08a09e93e50f935050812c45153
|
|
| MD5 |
172fb0da1decd3fcc6dedef1a321f07b
|
|
| BLAKE2b-256 |
119a93db0b1eabbafd40d71a9d46adbdf8d6253b66f3e12e49af3a77a90830e8
|
File details
Details for the file csh_ldap-2.5.3-py3-none-any.whl.
File metadata
- Download URL: csh_ldap-2.5.3-py3-none-any.whl
- Upload date:
- Size: 8.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27ef34dd49be600d9a1763ac82b75e22ebeb19c3b13c43c013fbad81a8067590
|
|
| MD5 |
b8232cafff8061f840485104cb453d13
|
|
| BLAKE2b-256 |
e870f195f275e15129c28ec3d17911afcaabb6e21595f4ecd3e19d14047336a1
|