Kong Python Plugin Server
Project description
kong-python-pluginserver
Plugin server for Python language support in Kong plugin.
Requires Kong >= 2.0.0.
Install the plugin server
pip3 install kong-pluginserver
# Replace the go-pluginserver with python plugin server
cp /usr/local/bin/kong-pluginserver /usr/local/bin/go-pluginserver
Configure Kong
Add the following line into kong.conf
:
plugins=bundled,py-hello,py-image
go_plugins_dir=/your/path/to/python/plugins/dir
For example, to test examples, clone kong-python-pluginserver
to /dir1/kong-python-pluginserver
and set go_plugins_dir
to /dir1/kong-python-pluginserver/examples
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 and implement a piping IPC.
- Currently you can't run Go plugins and Python plugins at the same time, as Kong only accepts one plugin server socket.
TODO
- Process per instance
- Tests
- Hot reload
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
kong_pluginserver-0.12.tar.gz
(8.1 kB
view hashes)
Built Distributions
Close
Hashes for kong_pluginserver-0.12-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8f611dbf0d4ec9659f482b31b251f87fb636b3d7201948093bcb6a7fb0e638c |
|
MD5 | 5dd7e8413a073ae9f81c5db1d49d97b9 |
|
BLAKE2b-256 | 38e34a898e2617f7b4a76b343dfebdf373d308e2a51915e6e900566786e37db5 |
Close
Hashes for kong_pluginserver-0.12-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 513e1c7fa512c0ef21413917ef57de3c5f698920e990e5b5b804f9fc93a86d9d |
|
MD5 | 2b7e1a85e48cf5f23dce58d5824aa15b |
|
BLAKE2b-256 | 95a87ca83dca91f270eeca2702418abd80caaa745f9da3a7fcee5bf18479de93 |