Skip to content

Files

Latest commit

 

History

History
37 lines (28 loc) · 1.23 KB

README.md

File metadata and controls

37 lines (28 loc) · 1.23 KB

Kea Python

Develop Kea hooks in Python.

This project integrates a Python3 interpreter into Kea, offering a lightweight interface to a selection of Kea classes. This enables the development of hooks in Python. The Python module 'kea' is designed to mirror the API of the Kea classes as closely as possible, ensuring a familiar experience for users.

Installation

Clone the kea-python project, compile it, and install it:

$ git clone https://github.com/phicus/kea-python.git
$ cd kea-python
$ autoreconf --install --force
$ make
$ sudo make install

Loading the kea-python hook

To load this hook into kea you will need a hook-libraries section in kea config that looks something like the following:

        "hooks-libraries": [{
            "library": "/usr/lib/kea/hooks/libdhcp_python.so",
            "parameters": {
                "libpython": "libpython3.8.so",
                "module": "/usr/local/lib/kea/keahook.py"
            }
        }],

Acknowledgements

This project has benefited from the development, contributions and resources provided by the following: