Skip to main content
Help us improve Python packaging – donate today!

CSH LDAP ORM

Project Description

# csh_ldap

[![PyPI version](https://badge.fury.io/py/csh_ldap.svg)](https://badge.fury.io/py/csh_ldap)
[![Build Status](https://travis-ci.org/liam-middlebrook/csh_ldap.svg?branch=master)](https://travis-ci.org/liam-middlebrook/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 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)

```

Release history Release notifications

This version
History Node

2.1.0

History Node

2.0.2

History Node

2.0.1

History Node

2.0.1.dev48

History Node

2.0.0.dev45

History Node

1.2.4.dev41

History Node

1.2.3.dev39

History Node

1.2.2.dev38

History Node

1.2.1.dev37

History Node

1.2.0.dev35

History Node

1.1.3.dev32

History Node

1.1.2.dev31

History Node

1.1.2.dev30

History Node

1.1.2.dev29

History Node

1.1.1.dev24

History Node

1.1.1.dev23

History Node

1.1.0.dev21

History Node

1.0.1.dev20

History Node

1.0.0.dev17

History Node

1.0.0.dev15

History Node

0.0.1.dev15

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
csh_ldap-2.1.0.tar.gz (7.0 kB) Copy SHA256 hash SHA256 Source None Apr 23, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page