Kong Python Plugin Server
Project description
kong-python-pluginserver
Plugin server for Python language support in Kong plugin.
Requires Kong >= 2.0.0.
Run the plugin server
git clone https://github.com/fffonion/kong-python-pluginserver
python3 ./setup.py install
kong-pluginserver -s KONG_PREFIX/go_pluginserver.sock
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.
- If your plugin is CPU-hungry, consider run in a seperate thread. In current
gevent
model, spending too much time in CPU work will block other requests. - Currently you can't run Go plugins and Python plugins at the same time, as Kong only accepts one plugin server socket.
TODO
- 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.1.tar.gz
(7.5 kB
view hashes)
Built Distributions
Close
Hashes for kong_pluginserver-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25d8ffd79cea7a57bbd6f9d0e028d091a98478fcf6444ef506068581a0275862 |
|
MD5 | fabbac16e173376cc2d96d3ef090d6cf |
|
BLAKE2b-256 | 736354075179ab152108b7ed6f1a4fa058d213f7c0e560e1673232be02f39919 |
Close
Hashes for kong_pluginserver-0.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5d65fab649b23ea0b8c19a8d959a28dd2e5d075dfe89e061e44dfe43536bb42 |
|
MD5 | f6d0c59605ab8eaa421e2c715137b191 |
|
BLAKE2b-256 | b46c06ae67f8a2883703a3fe42c7bc83ffbb621514c5c92cff180c2f27426d3b |