Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
dist/
/build
/doc/html
/ldapfilter_tab.py
.eggs/
*.egg-info
/lib/*.egg-info
/lib/*.egg
/lib/activedirectory/protocol/*.so
*.pyc
*.log
*.egg
*.db
*.pid
pip-log.txt
.DS_Store
*swp
.python-version
.tox
venv/
test.conf.atl
6 changes: 0 additions & 6 deletions README

This file was deleted.

56 changes: 56 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
Python-Active-Directory
=======================

This is Python-AD, an Active Directory client library for Python on UNIX/Linux systems.

**Note** - version 1.0 added support for Python >= 3.6 and version 2.0 will drop support for Python 2

Install
-------

.. code:: bash

$ pip install -e git+git@github.com:theatlantic/python-active-directory.git@v1.0.0+atl.2.0#egg=python-active-directory


Development
-----------

Get the code
~~~~~~~~~~~~

.. code:: bash

$ git clone git@github.com:theatlantic/python-active-directory.git
$ cd python-active-directory


Create virtual environment
~~~~~~~~~~~~~~~~~~~~~~~~~~

* Python 2: ``virtualenv venv``
* Python 3: ``python -mvenv venv``

.. code:: bash

$ . venv/bin/activate
$ pip install -e .


Testing
~~~~~~~

Version 1.0 switched to using pytest instead of nose, and added tox configuration
for supporting testing across various supported Python versions.

.. code:: bash

$ pip install tox
$ tox

Special environment variables:

* ``PYAD_TEST_CONFIG`` - Override the default test configuration file (formerly ``FREEADI_TEST_CONFIG``)
* ``PYAD_READONLY_CONFIG`` - Enable readonly tests, must be in the form of ``username:password@domain.tld``


2 changes: 1 addition & 1 deletion doc/preface.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
This is the reference manual for Python-AD. It is the definitive reference
for the Python-AD API. Other information on Python-AD, such as download
instructions, installation instructions, and a tuturial, can be found on the
<link xlink:href="http://code.google.com/p/python-ad/">Python-AD project
<link xlink:href="https://github.com/geertj/python-ad/">Python-AD project
page</link>.
</para>

Expand Down
12 changes: 6 additions & 6 deletions doc/reference.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</para>

<programlisting>
from ad import Creds
from activedirectory import Creds
</programlisting>

<para>
Expand Down Expand Up @@ -118,7 +118,7 @@
</para>

<programlisting>
from ad import activate
from activedirectory import activate
activate(creds)
</programlisting>

Expand Down Expand Up @@ -147,7 +147,7 @@
</para>

<programlisting>
from ad import Client
from activedirectory import Client
</programlisting>

<para>
Expand Down Expand Up @@ -471,7 +471,7 @@
<package>ad</package> package:

<programlisting>
from ad import Locator
from activedirectory import Locator
</programlisting>

<para>
Expand Down Expand Up @@ -538,8 +538,8 @@
the exception as per the code fragment below:

<programlisting>
from ad import Error as ADError
from ad import LDAPError
from activedirectory import Error as ADError
from activedirectory import LDAPError
</programlisting>

The <classname>ADError</classname> exception is raised for all errors that
Expand Down
8 changes: 4 additions & 4 deletions env.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#
# Python-AD is copyright (c) 2007 by the Python-AD authors. See the file
# "AUTHORS" for a complete overview.

from __future__ import print_function
import os
import os.path
import sys
Expand Down Expand Up @@ -49,8 +49,8 @@ def setenv(name, value):
topdir, fname = os.path.split(abspath)

bindir = os.path.join(topdir, 'bin')
print prepend_path('PATH', bindir)
print(prepend_path('PATH', bindir))
pythondir = os.path.join(topdir, 'lib')
print prepend_path('PYTHONPATH', pythondir)
print(prepend_path('PYTHONPATH', pythondir))
testconf = os.path.join(topdir, 'test.conf')
print setenv('FREEADI_TEST_CONFIG', testconf)
print(setenv('FREEADI_TEST_CONFIG', testconf))
4 changes: 2 additions & 2 deletions gentab.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
# This script generates the PLY parser tables. Note: It needs to be run from
# the top-level python-ad directory!

from ad.protocol.ldapfilter import Parser as LDAPFilterParser
from activedirectory.protocol.ldapfilter import Parser as LDAPFilterParser

os.chdir('lib/ad/protocol')
os.chdir('lib/activedirectory/protocol')

parser = LDAPFilterParser()
parser._write_parsetab()
17 changes: 17 additions & 0 deletions lib/activedirectory/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# This file is part of Python-AD. Python-AD is free software that is made
# available under the MIT license. Consult the file "LICENSE" that is
# distributed together with this file for the exact licensing terms.
#
# Python-AD is copyright (c) 2007 by the Python-AD authors. See the file
# "AUTHORS" for a complete overview.

from .core.exception import Error, LDAPError
from .core.constant import (LDAP_PORT, GC_PORT, AD_USERCTRL_ACCOUNT_DISABLED,
AD_USERCTRL_NORMAL_ACCOUNT,
AD_USERCTRL_WORKSTATION_ACCOUNT,
AD_USERCTRL_DONT_EXPIRE_PASSWORD)
from .core.client import Client
from .core.creds import Creds
from .core.locate import Locator
from .core.object import activate
File renamed without changes.
Loading