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.11.tar.gz
(8.1 kB
view hashes)
Built Distributions
Close
Hashes for kong_pluginserver-0.11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c6e1758c80ccb23c0252b68b063301452e6794d8c98ac7cdb31335b0fa8347dc |
|
MD5 | d391ab1ac25013d0931ac3863c4b71b7 |
|
BLAKE2b-256 | a2f4bedb269aca100b2a7ef4c98b46f67801f34bc3640f60dc84b7bcab87e8fc |
Close
Hashes for kong_pluginserver-0.11-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35b1172812fa9e753b26852b897f371d42c19f4f81fdc67ccb560613a29b5c22 |
|
MD5 | 6037a8d8f7f4f6fd4d1c88f0a1c8de4c |
|
BLAKE2b-256 | 06a270c00eaf793f0a29bbd75d3e7a375d807638bdf2f79147ae745c86df4f5f |