You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maybe it's just me, but I think it would be nice if FastUI also had a slightly higher level of abstraction that encapsulates FastAPI, for cases where one does not want/need to work directly with FastAPI.
Here's what I'm thinking...
Right now, I have to do this:
# use fastapi directly and understand how to map FastUI into FastAPIfromfastapiimportFastAPIapp=FastAPI()
@app.get("/api/user/{id}/", response_model=FastUI, response_model_exclude_none=True)`defuser_detail(id: int) ->list[AnyComponent]: ...
What I'd love to be able to do is something like this:
# use FastUI directly and encapsulate how it works with FastAPIfromfastuiimportFastUIapp=FastUI()
@app.get("/user/{id}/")defuser_detail(id: int) ->FastUIPage:
...
When I have a lot of different pages, the simplified api would be DRY'er.
The text was updated successfully, but these errors were encountered:
jimkring
changed the title
fastui app/router decorator that prefixes /api for page urls
Higher level api that abstracts away FastAPI
May 4, 2024
Maybe it's just me, but I think it would be nice if FastUI also had a slightly higher level of abstraction that encapsulates FastAPI, for cases where one does not want/need to work directly with FastAPI.
Here's what I'm thinking...
Right now, I have to do this:
What I'd love to be able to do is something like this:
When I have a lot of different pages, the simplified api would be DRY'er.
The text was updated successfully, but these errors were encountered: