Skip to main content

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


Release history Release notifications

This version

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for kong-pluginserver, version 0.1
Filename, size File type Python version Upload date Hashes
Filename, size kong_pluginserver-0.1-py2-none-any.whl (10.4 kB) File type Wheel Python version py2 Upload date Hashes View hashes
Filename, size kong_pluginserver-0.1-py3-none-any.whl (10.4 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size kong_pluginserver-0.1.tar.gz (7.5 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page