Feature Request: Load Demo App on Colab without Port Forwarding Trick
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- jupyter-notebook, python
- Domain
- documentation, web-dev
Research direction
Start by reviewing the linked Gradio Colab example and the current ngrok setup in the issue. Determine how a Shiny for Python app could run in Google Colab with a nested display and no port-forwarding workaround; done means a getting-started notebook can launch and display the demo app without ngrok.
Written by the indexing model from the issue text.
Description
Desired Feature
I'm not sure this is possible, but it would be nice to have a getting starting example in a Google Colab notebook. This is offered by gradio ( https://gradio.app/docs/ ) via a "Open with Colab" badge:
From here, the notebook can be launched and iterated upon with a nested display:
Current Solution
At the moment, the only way to view a Shiny for Python app with Google Colab is to use ngrok to port forward 8000.
## Setup port-forwarding
# Install ngrok
!wget -q https://bin.equinox.io/c/4VmDzA7iaHb/ngrok-stable-linux-amd64.zip
!unzip -q ngrok-stable-linux-amd64.zip
# Set ngrok authtoken once per-session
!./ngrok authtoken <NGROK_AUTH_TOKEN>
# Replace <NGROK_AUTH_TOKEN> with a token.
# Start an HTTP tunnel forwarding to your local port 8000
get_ipython().system_raw('./ngrok http 8000 &')
# Open a local host port and extract the URL
!curl -s http://localhost:4040/api/tunnels | python3 -c \
"import sys, json; print(json.load(sys.stdin)['tunnels'][0]['public_url'])"
- Dominant language
- Python
- Stars
- 1.8k
- Forks
- 135
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 21
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from posit-dev/py-shiny
-
needs-triage Priority: Medium
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
enhancement to-close
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
ai-triage:done bug needs-triage Priority: Low
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
-
ai-triage:done needs-triage Priority: Medium
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
All issues in posit-dev/py-shiny
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100