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
Built Distributions
File details
Details for the file kong_pluginserver-0.12.tar.gz
.
File metadata
- Download URL: kong_pluginserver-0.12.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1a226d37e41060dd8d2301b59ce81172ffffdd34bc5da618b56eaae253849d39 |
|
MD5 | f580e372ea91f0939fd6bfc50541adf1 |
|
BLAKE2b-256 | e34c35c164647c6c57b22f1b82c87cf63e68cca7a370064ab805eca10970996a |
File details
Details for the file kong_pluginserver-0.12-py3-none-any.whl
.
File metadata
- Download URL: kong_pluginserver-0.12-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8f611dbf0d4ec9659f482b31b251f87fb636b3d7201948093bcb6a7fb0e638c |
|
MD5 | 5dd7e8413a073ae9f81c5db1d49d97b9 |
|
BLAKE2b-256 | 38e34a898e2617f7b4a76b343dfebdf373d308e2a51915e6e900566786e37db5 |
File details
Details for the file kong_pluginserver-0.12-py2-none-any.whl
.
File metadata
- Download URL: kong_pluginserver-0.12-py2-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 513e1c7fa512c0ef21413917ef57de3c5f698920e990e5b5b804f9fc93a86d9d |
|
MD5 | 2b7e1a85e48cf5f23dce58d5824aa15b |
|
BLAKE2b-256 | 95a87ca83dca91f270eeca2702418abd80caaa745f9da3a7fcee5bf18479de93 |