Added bottle and kyoukai benchmarks, updated sanic and aiohttp

This commit is contained in:
Channel Cat
2016-10-16 00:50:49 -07:00
parent 4ab5ee36de
commit 41d31b9e55
5 changed files with 30 additions and 5 deletions

View File

@@ -0,0 +1,20 @@
# Run with: python3 -O simple_server.py
import asyncio
from kyoukai import Kyoukai, HTTPRequestContext
import logging
import ujson
import uvloop
loop = uvloop.new_event_loop()
asyncio.set_event_loop(loop)
kyk = Kyoukai("example_app")
logger = logging.getLogger("Kyoukai")
logger.setLevel(logging.ERROR)
@kyk.route("/")
async def index(ctx: HTTPRequestContext):
return ujson.dumps({"test":True}), 200, {"Content-Type": "application/json"}
kyk.run()