kbs-plugin-sdk-python

Python SDK for building external KBS plugins over gRPC.

KBS (Key Broker Service) supports external plugins that receive HTTP requests forwarded from the Key Broker Service, process them, and return HTTP responses. This SDK handles the gRPC plumbing so you only implement your plugin logic.

Install

pip install kbs-plugin-sdk-python

30-second example

import asyncio
from kbs_plugin_sdk import PluginHandler, PluginServer, PluginRequest, PluginResponse

class MyPlugin(PluginHandler):
    async def handle(self, request: PluginRequest) -> PluginResponse:
        return PluginResponse(body=b'{"status": "ok"}', status_code=200)

async def main():
    await PluginServer(MyPlugin()).with_address("0.0.0.0:50051").serve()

asyncio.run(main())

See Quick Start for the next steps, or Usage for the full API reference.