from fastapi import FastAPI, Request from .wekan.api import Wekan import json app = FastAPI() @app.get("/") async def root(): return {'message': 'Hello World'} @app.post("/hook") async def hook(request: Request): r = await request.json() # model_created = json.loads(r['body'].split("model_created: ")[1])["model"] # return wekan.create_user(model_created["pk"])