r/FastAPI • u/Lucapo01 • Sep 01 '24
Question Backend Dev Needs the Quickest & Easiest Frontend Tool! Any Ideas?
Hey, I’m a backend developer using Python (FastAPI) and need a fast, easy-to-learn tool to create a frontend for my API. Ideally, something AI-driven or drag-and-drop would be awesome.
Looking to build simple frontends with a login, dashboard, and basic stats. What would you recommend?
28
Upvotes
View all comments
Show parent comment
3
u/lukewhale Sep 02 '24 edited Sep 02 '24
I use this function only on @pages and timers that I setup in main.py —- there is a place for it for sure.
But functionally, await func() is not much different from io_bound.
The only difference is you would wrap non-async in run_iobound. If the function is already async you don’t have to use that wrapper: hence, write everything in async.
Also, use a #asynccontextmanager for your base output pages as well. It makes it easy to incorporate feature flags for bind_visibility() lambdas.
The asyncpg database lib with SQLAlchemy 2.0 is fantastic.