posit-dev / posit-dev/py-shiny

Upgrade App's UI function to async

Open
#968 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.8k
Forks
135
Avg merge
2d 18h
Merged PRs (30d)
21

Description

Would allow for app authors to make async calls within their UI function.

From what I can see, https://github.com/posit-dev/py-shiny/blob/3e587abacacc0cc8482d7edaa9f5b05aed732e4e/shiny/_app.py#L305 is the only place it is executed and is already within an async function.

We could wrap it in async at the very beginning, avoiding repeated is async checks.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in shiny/_app.py around line 305, where the app's UI function is executed, and trace how the surrounding async function invokes it. Confirm how synchronous UI functions currently behave and define the completed behavior as allowing app authors to await calls within the UI function without repeated async checks.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.