Files
WLED/.venv/lib/python3.11/site-packages/ajsonrpc/backend/sanic.py
wartana bb17574d0c
Some checks failed
WLED CI / wled_build (push) Has been cancelled
build: Initialize Python virtual environment and install project dependencies.
2026-02-19 22:31:26 +08:00

13 lines
409 B
Python

from sanic.response import json as json_response
from .common import CommonBackend
class JSONRPCSanic(CommonBackend):
@property
def handler(self):
"""Get Sanic Handler"""
async def handle(request):
response = await self.manager.get_response_for_payload(request.body)
return json_response(response.body, dumps=self.manager.serialize)
return handle