pydantic / FastUI

Build better UIs faster.
https://fastui-demo.onrender.com
MIT License
8.27k stars 317 forks source link

could this project be simplified/refactored with FastHTML? #341

Closed rbavery closed 3 months ago

rbavery commented 3 months ago

https://github.com/AnswerDotAI/fasthtml

Maybe all the complications with NPM, React, bundling that are not familiar to python users like myself could be removed?

samuelcolvin commented 3 months ago

I don't understand the point in fasthtml when we've had dominate for years.

I have a different idea for rendering the frontend server side, hopefully I can work on it later this year or next.

samuelcolvin commented 3 months ago

See #48 which is related.

sbusso commented 1 month ago

@samuelcolvin I don't understand the "we've had dominate for years". what and how has fastui dominated?

rbavery commented 1 month ago

same, I'm curious. I know pydantic is very popular, but I haven't seen a solution that is widely popular for converting pydantic models into form UIs.

I read #48 I think the value of FastHTML is that instead of writing templates in something few have heard about (Jinja language) you can write the templates in Python that maps cleanly to HTML

samuelcolvin commented 1 month ago

@samuelcolvin I don't understand the "we've had dominate for years". what and how has fastui dominated?

Ha, no I meant https://github.com/Knio/dominate

same, I'm curious. I know pydantic is very popular, but I haven't seen a solution that is widely popular for converting pydantic models into form UIs.

I read #48 I think the value of FastHTML is that instead of writing templates in something few have heard about (Jinja language) you can write the templates in Python that maps cleanly to HTML

Ye I agree that's the way to go. I've no idea whether fasthtml or dominate are the best way to go, I harboured some ideas to build something similar in rust, but haven't had the time to put into it.

In the end, fastui has worked well for our use case, but we haven't had the time to put into extending it further yet.

If we do, I guess this is the way we'll go.

sbusso commented 1 month ago

Hey @samuelcolvin, thanks a lot, and I'm sorry for my ignorance. That package sounds like a good one, too!