Implemented modular code structure
Refactored repository into kaya-core and kaya-rsgi packages
This commit is contained in:
+2
-11
@@ -1,15 +1,6 @@
|
||||
from kaya import KayaApp, HttpContext, HttpMethod, WebSocket
|
||||
from kaya.core import KayaApp, HttpContext, HttpMethod, WebSocket
|
||||
from typing import List
|
||||
|
||||
class Hello(KayaApp):
|
||||
pass
|
||||
|
||||
# async def handle_request(self, ctx: HttpContext) -> None:
|
||||
# async for chunk in ctx.request_body:
|
||||
# print(chunk.decode())
|
||||
# await ctx.send_str(200, 'Hello World')
|
||||
|
||||
|
||||
app = KayaApp()
|
||||
|
||||
|
||||
@@ -53,4 +44,4 @@ async def echo(ws: WebSocket) -> None:
|
||||
elif msg.kind == 'binary':
|
||||
data = msg.data
|
||||
assert isinstance(data, bytes)
|
||||
await ws.send_bytes(data)
|
||||
await ws.send_bytes(data)
|
||||
|
||||
Reference in New Issue
Block a user