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
@app.get("/table")
async def stream_html_table():
async def async_generator():
t = table()
with t:
with thead():
with tr():
th("Row 1"); th("Row2"); th("Row3")
with tbody():
yield t.render_without_closing_tags()
for r in range(rows):
tr = tr()
with tr:
(a, b, c) = await calculate_next_row()
td(a); td(b); td(c)
yield tr.render()
yield t.render_closing_tags()
return async_generator(), 200
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Example:
Beta Was this translation helpful? Give feedback.
All reactions