Skip to main content

csh-ldap

PyPI version Build Status

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 group member uids 
rtp = instance.get_group('rtp').get_member_uids()
# returns ['spaced', ...]

# get group member uids (other way)
rtp = instance.get_group_member_uids(groups=["rtp"])

# get uids of members in two (or more) groups and not in groups
fancy = instance.get_group_member_uids(groups=["rtp", "onfloor"], excluded=["eboard-opcomm"])

# get uuids of members in two (or more) groups and not in groups
# that's right! ipaUniqueId
fancy = instance.get_group_member_uuids(groups=["rtp", "onfloor"], excluded=["eboard-opcomm"])

# get other miscellaneous attributes of members in group
# look how rich drink admins are (admin abuse!!!)
admin_abuse = instance.get_group_member_attributes(group=["drink"], attributes=["uid", "drinkBalance"])
# returns dicts for each member
"""
I wonder what happened here
[
{
    'uid': 'cole',
    'drinkBalance': '996246'
},
{
    'uid': 'zxcv',
    'drinkBalance': '3847173'
}
]
"""

# 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)

Metadata

Release files for csh-ldap 2.5.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for csh-ldap 2.5.8
File Size Uploaded Provenance Actions
csh_ldap-2.5.8.tar.gz 11.8 kB With provenance Details for csh_ldap-2.5.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for csh-ldap 2.5.8
File Interpreter ABI Platform Actions
csh_ldap-2.5.8-py3-none-any.whl Python 3 none any Details for csh_ldap-2.5.8-py3-none-any.whl

Total release size: 21.7 kB

Release files / csh_ldap-2.5.8.tar.gz

Download URL csh_ldap-2.5.8.tar.gz
Size 11.8 kB
Tags Source
SHA-256 checksum
How to use checksums
587d35b663e46aae5c86f83a10a1904c9e667d34076df15fbe2c378e9eca0997
BLAKE2b-256 checksum
How to use checksums
fbbf40c3c672c92ceef29d669a1cd63e713a67c701b42b76df7b9ed474025d8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 8, 2026.

Transparency log

Release files / csh_ldap-2.5.8-py3-none-any.whl

Download URL csh_ldap-2.5.8-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dcee4674959e644b449af0deb70b4fe6a3748cf5e181c56d21b6416edfde173d
BLAKE2b-256 checksum
How to use checksums
92dccd46c1d59c00436691af973b4e25fc8cfc15e5a2f35d1739d0b09bfc95f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 8, 2026.

Transparency log

Security for csh-ldap 2.5.8

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for csh_ldap-2.5.8.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 8, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

2.5.8 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page