Cookie Consent by Free Privacy Policy Generator

Share Python Apps Instantly: Run Scripts with uv Tool

Go to the Best Of the SEO Community.

Elias
Elias
Dec 28, 2024, 5:49 AM
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:
 
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:
df = pd.read_csv("<https://raw.githubusercontent.com/user/repo/data.csv>")```
YouTube short demo:
<https://www.youtube.com/watch?v=P_r1CWCXquc>
 
Code file:
<https://gist.github.com/eliasdabbas/88e2e49e6ea59b74656fd0bdad3b0019>
 
Running Python scripts with uv tutorial:
<https://adver.tools/python/tutorial/running-python-scripts-uv/>
Running Python scripts with uv
Running Python scripts with uv – advertools
An introduction to running Python scripts with the uv library, what problems it solves, and how to use it for self-contained scripts, massively simplifying the process of running your scripts.

Our Values

What we believe in

Building friendships

Kindness

Giving

Elevating others

Creating signal

Treating each other with respect

What has no home here

Diminishing others

Gatekeeping

Taking without giving back

Spamming others

Arguing

Selling links and guest posts


Sign up to get the newsletter

By signing up, you agree to our Privacy Policy and Terms of Service. We may send you newsletters and occasional emails about products or services. You can opt-out at any time.