Package: kong-pdk
kong-python-pluginserverPlugin server and PDK (Plugin Development Kit) for Python language support in Kong.Requires Kong >= 2.3.0.DocumentationSee inKong DocsInstall the plugin serverpip3installkong-pdkUsageusage: kong-python-pluginserver [-h] [-p prefix] [-v] [--version] [--socket-name SOCKET_NAME] [--listen-queue-size LISTEN_QUEUE_SIZE]
                         [--no-lua-style] [-m | -g] -d directory [--dump-plugin-info name] [--dump-all-plugins]

Kong Python Plugin Server.

optional arguments:
  -h, --help            show this help message and exit
  -p prefix, --kong-prefix prefix, -kong-prefix prefix
                        unix domain socket path to listen (default: /usr/local/kong/)
  -v, --verbose         turn on verbose logging (default: 1)
  --version, -version   show program's version number and exit
  --socket-name SOCKET_NAME
                        socket name to listen on (default: python_pluginserver.sock)
  --listen-queue-size LISTEN_QUEUE_SIZE
                        socket listen queue size (default: 4096)
  --no-lua-style        turn off Lua-style "data, err" return values for PDK functions and throw exception instead (default: False)
  -m, --multiprocessing
                        enable multiprocessing (default: False)
  -g, --gevent          enable gevent (default: False)
  -d directory, --plugins-directory directory, -plugins-directory directory
                        plugins directory
  --dump-plugin-info name, -dump-plugin-info name
                        dump specific plugin info into stdout
  --dump-all-plugins, -dump-all-plugins
                        dump all plugins info into stdoutPDK API referenceThe PDK (plugin developemet kit) API document can be viewedhere.Reference is generated by Sphinx underdocfolder and published to thegh-pagesbranch.
To generate updated docs, use:git worktree add docs/build/html gh-pages
cd docs
make deps && make htmlDeprecation NoticeIn next major release of Kong Python PDK, return values will default to use Python style error handling instead of
Lua style. The new style API can be turned on now with--no-lua-style.# old lua-style PDK APIhost,err=kong.request.get_header("host")iferr:pass# error handling# new python-style PDK APItry:host=kong.request.get_header("host")# no err in return, instead they are thrown if anyexceptExceptionasex:pass# error handlingTODOTestsHot reloadUnreleased0.3.6- 2023-06-27bug fixesadd missing file enterprise_editione8d7c860.3.5- 2023-06-20bug fixesdelete message queue when they are not needed any more (#122)ffeb2f20.3.4- 2023-06-20bug fixesserialize error and disable strict_map_key to allow (#117)25db61c0.3.2- 2022-11-08bug fixesadd version field in PluginInfo rpc (#79)132f31d0.3.1- 2022-06-13bug fixesplugin closure syntax correction (#64)920cc26removing upper() to allow matching of attributes (#69)1997a6c#50: return type of get_raw_bodys should be binary string59ab367catch error from PDK methods (#53)7f82677#50: return type should support binary stringfdb2c9b0.3.0- 2022-02-17bug fixesadd option to use python style error handling to be consistent with style headers39a75bdinclude correct instances list in get_status56d7ad7exit immediately from kong.response.{error,exit}ba3d5fa0.2.7- 2021-08-04bug fixescorrectly pass schema in embedded server099a498no longer normalize hyphens in socket name in embedded server to keep consistent with what Kong expects20c01da0.2.6- 2021-07-19bug fixeslistener to use msgpack.Unpacker iterratorbed56c40.2.5- 2021-06-24bug fixeslistener to use msgpack.Unpacker iterratorbed56c4use .py file for type hint (#13)1bf38200.2.4- 2021-06-17bug fixescheck correct flags existence in dedicated server (#10)b18dd45set larger listen queue size (#9)a3eb3400.2.3- 2021-05-13bug fixesdisplay defaults on cli and print PluginServerException to warning13991ecskip running cleanup timere10c098standarlize error on instance not found0dfc94ffeaturesadd response phase (#4)3aca2830.2.2- 2021-03-29bug fixescorrect license in setup.py (#3)b257c98threading mode pipe and styles6f73ac7enable plugin server without gevent modea29c4d7featuresadd typed interfacesf98e44d0.2.1- 2021-02-24bug fixesdisable gevent in multiprocessing and make it optional5b6fb68chmod+x on examples1f5905dfeaturesset friendly process titleaa59083multiprocessing mode1a97d260.2.0- 2021-02-22bug fixessync with Kong 2.3 updated42de7ecode refactoringrename kong_pluginserver to kong_pdke802627featuresexit server if parent is dead0ee2183embed server in pluginaf55deb0.1.2- 2020-02-21bug fixespython2 compatibility0e4cf1c0.1.1- 2020-02-200.1.0 - 2020-01-03