How to share Python apps (Dash, Streamlit, etc.) without deploying them
There is a magical feature in uv, which allows you run remote scripts hosted online. As a consequence, you can have the app code in a file online, and simply run:
uv run https://example.com/my_script.py
Then uv will:
🔵 Temporarily download the script
🔵 Create a virtual environment using the inline metadata (Python version and package dependencies)
🔵 Activate the environment
🔵 Run the Python code
Even with a non-technical audience, you can guide them to install uv (30 seconds), and share the uv run... command.
You can keep updating the online version, and they can periodically check the changes.
You can include data files (also online), by slightly modifying your code. For example:
import pandas as pd
df = pd.read_csv("https://raw.githubusercontent.com/user/repo/data.csv")
Uv seems to be or at least to become the new Swiss army knife for Python development. I guess I'll have to take a deeper look into it.
Efstratios Tsesmetzis uv
Wow thats cool. A lot simpler than running locally and sharing with ngrok.
Code file: https://gist.github.com/eliasdabbas/88e2e49e6ea59b74656fd0bdad3b0019 Running Python scripts with uv tutorial: https://adver.tools/python/tutorial/running-python-scripts-uv/