This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This is a module for handling LDAP operations in Python. Uses libldap2 on Unix platforms and WinLDAP on Microsoft Windows. LDAP entries are mapped to a special Python case-insensitive dictionary, tracking the changes of the dictionary to modify the entry on the server easily.

Supports only Python 3.3 or newer, and LDAPv3.

Requirements for building

  • python3.3-dev or newer
  • libldap2-dev
  • libsasl2-dev
  • libkrb5-dev or heimdal-dev (optional)

Features

  • Uses LDAP libraries (OpenLDAP and WinLDAP) written in C for faster processing.
  • Simple pythonic design.
  • Implements an own dictionary-like object for mapping LDAP entries that makes easier to add and modify them.
  • Works with various asynchronous library (like asyncio, gevent).

Documentation

Documentation is available online with a simple tutorial.

Example

Simple search and modify:

import bonsai

client = bonsai.LDAPClient("ldap://localhost")
client.set_credentials("SIMPLE", ("cn=admin,dc=bonsai,dc=test", "secret"))
with client.connect() as conn:
    res = conn.search("ou=nerdherd,dc=bonsai,dc=test", 2, "(cn=chuck)")
    res[0]['givenname'] = "Charles"
    res[0]['sn'] = "Carmichael"
    res[0].modify()

Using with asnycio:

import asyncio
import bonsai

@asyncio.coroutine
def do():
    client = bonsai.LDAPClient("ldap://localhost")
    client.set_credentials("DIGEST-MD5", ("admin", "secret", None, None))
    with (yield from client.connect(is_async=True)) as conn:
        res = yield from conn.search("ou=nerdherd,dc=bonsai,dc=test", 2)
        print(res)
        who = yield from conn.whoami()
        print(who)

Changelog

Currently, you can read the changelog here.

Contribution

Any contributions and advices are welcome. Please report any issues at the GitHub page.

Release History

Release History

0.8.9

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.8.8

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.8.7

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.8.6

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.8.5

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.8.1

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

0.8.0

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
bonsai-0.8.9-cp34-cp34m-win32.whl (50.0 kB) Copy SHA256 Checksum SHA256 cp34 Wheel Nov 19, 2016
bonsai-0.8.9-cp34-cp34m-win_amd64.whl (54.5 kB) Copy SHA256 Checksum SHA256 cp34 Wheel Nov 19, 2016
bonsai-0.8.9-cp35-cp35m-macosx_10_11_x86_64.whl (1.3 MB) Copy SHA256 Checksum SHA256 cp35 Wheel Nov 19, 2016
bonsai-0.8.9-cp35-cp35m-win32.whl (51.0 kB) Copy SHA256 Checksum SHA256 cp35 Wheel Nov 19, 2016
bonsai-0.8.9-cp35-cp35m-win_amd64.whl (57.6 kB) Copy SHA256 Checksum SHA256 cp35 Wheel Nov 19, 2016
bonsai-0.8.9-py3.5-win-amd64.egg (92.2 kB) Copy SHA256 Checksum SHA256 3.5 Egg Nov 19, 2016
bonsai-0.8.9.tar.gz (96.5 kB) Copy SHA256 Checksum SHA256 Source Nov 19, 2016
bonsai-0.8.9.win32-py3.4.msi (143.4 kB) Copy SHA256 Checksum SHA256 3.4 Windows MSI Installer Nov 19, 2016
bonsai-0.8.9.win32-py3.5.msi (143.4 kB) Copy SHA256 Checksum SHA256 3.5 Windows MSI Installer Nov 19, 2016
bonsai-0.8.9.win-amd64-py3.4.msi (147.5 kB) Copy SHA256 Checksum SHA256 3.4 Windows MSI Installer Nov 19, 2016
bonsai-0.8.9.win-amd64-py3.5.msi (151.6 kB) Copy SHA256 Checksum SHA256 3.5 Windows MSI Installer Nov 19, 2016
bonsai-0.8.9.zip (123.9 kB) Copy SHA256 Checksum SHA256 Source Nov 19, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting