Add helpers and write documentation on how to embed the framework in an existing fastapi app
Opened this issue · 4 comments
barapa commented
Add helpers and write documentation on how to embed the framework in an existing fastapi app
paveldedik commented
Hi, thank you for taking an interest in the framework.
I was already trying to integrate the framework in FastAPI, but it requires some tweaking and I haven't finished it yet.
Right now, your only option is to do something like this in FastAPI endpoints:
from fastapi import FastAPI
from ludic.html import p, b
from ludic.web.responses import LudicResponse
app = FastAPI()
@app.get("/")
def read_root() -> LudicResponse:
content = p("Hello ", b("World"))
return LudicResponse(content)
Mte90 commented
Wondering also for Django...
paveldedik commented
Mte90 commented
Ops I missed that issue