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")
Hope you find it useful!