Questions tagged [py-shiny]

Shiny for Python - Shiny makes it easy to build interactive web applications with the power of Python’s data and scientific stack.

Shiny for Python:

Shiny makes it easy to build interactive web applications with the power of Python’s data and scientific stack.

38 questions
4
votes
1 answer

shiny for Python using add_layer for Popus from ipyleaflet

I want to use m.add_layer for Popus from ipyleaflet in shiny for python (as given here). However, it is not working as expected. My minimum working example is given below: from shiny import App, render, ui from shinywidgets import output_widget,…
MYaseen208
  • 22,666
  • 37
  • 165
  • 309
4
votes
1 answer

Print output based on user input in dash (or shiny)

I would like to get inputs x and y from a user's input to a text box. if x + 2*y 3*x*y > 100: print('Blurb 1') else: print('Blurb 2') This seems to be convoluted in dash with callbacks, etc, even though it could be self-contained and quite…
largesse
  • 75
  • 1
  • 5
3
votes
1 answer

Python for shiny, How to access input id that gernerated by iteration?

I am new in python for shiny.I have create text input ui from iteration that number of iteration come from user input(in example code it is 5 times).But I can not access their ID because in shiny it must call 'input.()' and deny by python…
Suzanoo'''
  • 101
  • 1
  • 6
3
votes
1 answer

How does one set up traceback logging in py-shiny which runs on uvinicorn for python?

I'm having trouble getting the logger to write any un-caught traceback errors to the log file. Here is my minimum working example in python to reproduce my issue. The idea is that I will have a file that I can reference an end-user to locate and…
3
votes
1 answer

Docker image for Rshiny app that uses python scripts too

I'm new to Docker and I want to create an image in orde rto deploy a shiny app that sources python scripts using "reticulate" package. Is there a place where I can start building this Docker image or build on top of some existing images. I Can…
dito
  • 129
  • 1
  • 6
2
votes
1 answer

Python Shiny - how to stop the app when the user closes the browser?

In R, there are solutions to stop the App when the user closes the browser, such as # in server.R session$onSessionEnded(function() { stopApp() }) Is there some similar solution for python ? I found this proposed solution, but it doesn't seem to…
user2551579
  • 21
  • 1
  • 2
2
votes
1 answer

How to un pyinstaller converted python app with Shiny for Python

I downloaded and installed Python 3.10.6 on windows 10 pro, installed Shiny for Python, created the sample app and run it. This worked fine. I installed pyinstaller and converted the app to an exe. I tried to run the app it threw (please see…
Ray Tayek
  • 9,841
  • 8
  • 50
  • 90
1
vote
1 answer

User inputs for controlling a plotly plot, using Shiny in Python

I am trying to have user defined input to control sunburst plots. This is all coded in Python, and used both the Shiny and Plotly package. The reason for using these over dash is as I have worked with both of these in R, however this project is…
Beavis
  • 476
  • 3
  • 13
1
vote
1 answer

Matplotlib figure as SVG with Shiny for Python

The axis labels and titles in the figure in the app below appears unsharp to me. I assume it's because the figure is rendered as PNG, so I assume that rendering it as SVG will fix the issue. However, I'm not sure how to do that. Any pointers? from…
Stefan Hansen
  • 499
  • 1
  • 3
  • 16
1
vote
2 answers

Shiny for python - adding an icon to the input_action_button

With R Shiny, adding an icon to an actionButton uses icon() function. actionButton( ... , icon = shiny::icon(icon_name) ) How can this be achieved with shiny.ui.input_action_button? ui.input_action_button( ... …
Vlad
  • 3,058
  • 4
  • 25
  • 53
1
vote
1 answer

Shiny for Python: Implementing an asynchronous iterator (almost there)

The endgame is making an app reactive to a non-blocking stream of information (in my particular case a MongoDB ChangeSteam; it could also be a Kafka consumer). For the sake of reproducibility, in the example below I implement a generic asynchronous…
cvmartin
  • 13
  • 4
1
vote
1 answer

How to update a pyshiny text input with title from clicked marker in ipyleaflet map

I'd like to update a text input in a pyshiny app each time a marker is clicked in an ipyleaflet map widget using the marker's title value. I have been using the marker.on_click() callback to get the title (station_id in this case) from the clicked…
wardj
  • 13
  • 2
1
vote
0 answers

how to input shiny reactive value to a python function in rstudio shiny?

I like to start a conversation about how to pass a reactive (R) value say coming from an sliderInput() to a python function in Rstudio. What are the ways?
Shawn
  • 11
  • 5
0
votes
0 answers

How to prevent Shiny `nav_menu()` from overflowing?

Working in Python Shiny - having this issue with the ui.nav_menu() function where the items overflow beyond the screen. Tried adjusting the align parameter to both 'left' and 'right' but that didn't resolve it. ui.nav_menu( 'Help', …
0
votes
1 answer

How to properly remove previously inserted UI in Shiny?

Working on a Shiny app where the user can press a button and receive all tests that evaluate to False. I'm able to successfully insert these test messages into the UI; however, every time I press the button to rerun these tests, the UI adds onto the…
1
2 3