Code Monkey home page Code Monkey logo

python-lmap's Introduction

python-lmap

This Python module contains two files: ldap.py and lmap.py. ldap.py contains a very small Python 3.3-compatible openldap libldap-interface based on ctypes (that means it does not need any compiled code to work). This interface, though it is extremely simple, supports the most common LDAP operations.

lmap.py is a (still work in progress) python object to LDAP mapper that supports all kinds of magic to make working with LDAP entries from python less of a pain. If you are going to use it, be careful because it might not (yet) behave as you would expect.

There are unit tests for both parts. In test_ldap.py you can find some code you may use to set up a temporary slapd (LDAP-server) for unit testing that will be automatically torn down after the tests.

Definition of "small"

  181 lmap/ldap.py
  196 lmap/lmap.py
  377 total
          ***
  159 lmap/test_ldap.py
   81 lmap/test_lmap.py
  240 total

Performing SASL binds and ctypes problems

The LDAP driver now supports SASL binds, for example for Kerberos. The default is to use kerberos via GSSAPI, using an existing ticket after you ran kinit. You have to provide your Kerberos realm (this looks like a domain name). You may, however, also just pass username/realm/password into it and it will try to auth using those.

Contributing

If you like this code, fork it, send me a pull request ;)

python-lmap's People

Contributors

jaseg avatar

Stargazers

riot avatar  avatar  avatar oliver avatar  avatar  avatar Nikola Bjelicic avatar  avatar

Watchers

 avatar James Cloos avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.