Kong PDK for Python and Plugin Server
Project description
kong-python-pluginserver
Plugin server and PDK (Plugin Development Kit) for Python language support in Kong.
Requires Kong >= 2.3.0.
Install the plugin server
pip3 install kong-pluginserver
Configure Kong
Add the following line into kong.conf
:
plugins=bundled,py-hello,py-image
pluginserver_names=go, py
pluginserver_py_socket=/usr/local/kong/python_pluginserver.sock
pluginserver_py_start_cmd=/usr/local/bin/kong-pluginserver -d /dir/to/kong-python-pluginserver/examples
pluginserver_py_query_cmd=/usr/local/bin/kong-pluginserver -d /dir/to/kong-python-pluginserver/examples --dump-all-plugins
For example, to test examples, clone kong-python-pluginserver
to /dir/to/kong-python-pluginserver
.
Enable the plugin
Same step as it's a Lua plugin.
Notes
- All PDK API supported by Go Plugin Server is supported.
- The plugin server is implemented by gevent module for now, thus only one CPU core will be used. If your plugin is CPU-hungry, consider run the plugin instance in a seperate process (examples/py-hello.py as an example).
TODO
- Close signal handler?
- Tests
- Hot reload
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
kong_pdk-0.2.tar.gz
(9.7 kB
view details)
Built Distributions
kong_pdk-0.2-py3-none-any.whl
(19.9 kB
view details)
kong_pdk-0.2-py2-none-any.whl
(19.9 kB
view details)
File details
Details for the file kong_pdk-0.2.tar.gz
.
File metadata
- Download URL: kong_pdk-0.2.tar.gz
- Upload date:
- Size: 9.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ed840502f1216124894f33863e9e05cfb8c9f16830fa65168b3158984178941 |
|
MD5 | 5c51441ab69126fcd71605a5a7122bf1 |
|
BLAKE2b-256 | 9193c908fa17ab152930a6d08450ff99fd8604f6c791e8c9e6f1fde89e88a802 |
File details
Details for the file kong_pdk-0.2-py3-none-any.whl
.
File metadata
- Download URL: kong_pdk-0.2-py3-none-any.whl
- Upload date:
- Size: 19.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d80b2d5455c773facec8a29bcb2c75169a53ea1fa33b55c654f9f201fd0206be |
|
MD5 | b0daa553a25216b7519746ef9facfb8b |
|
BLAKE2b-256 | f0243f79c7ab0c74c803b965be5a19ce9d809cfc876d5afbe9b9b1325f15a1ce |
File details
Details for the file kong_pdk-0.2-py2-none-any.whl
.
File metadata
- Download URL: kong_pdk-0.2-py2-none-any.whl
- Upload date:
- Size: 19.9 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.0 setuptools/51.1.1 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.8.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2468ef842d421937d3cbc37446fbad6004fd1e38bb415a60422b106889c989b8 |
|
MD5 | 4296897e324aa74f71390858c57304d8 |
|
BLAKE2b-256 | 87959b3497abc931ad538fcb8a5bfa5765fa663438adfff50d6bdfe4227ca509 |