posit-dev / posit-dev/py-shiny

Why not a generic `@render` decorator?

Open
#528 1 comment 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

If the return value of my function is a matplotlib plot, why do I have to decorate with @render.plot? How else could I render it?

The followup question: when would I ever use @output and not want the thing @rendered? Could @output add the @render step, and dispatch the right render method based on the type of the object it receives?

In some of my test apps, my server function has more lines of decorators than lines of code in the functions.

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

No files or tests are named. Start by tracing the existing @render.plot, @output, and generic @render entry points, then compare how output types are handled. Done means a decided API for generic rendering, including when @output should render automatically, with behavior covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
web-dev
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.