Skip to content

Instantly share code, notes, and snippets.

@jasonm23
Created April 10, 2025 02:01
Show Gist options
  • Save jasonm23/ff30f17a256867293830d61eef628d7a to your computer and use it in GitHub Desktop.
Save jasonm23/ff30f17a256867293830d61eef628d7a to your computer and use it in GitHub Desktop.
Running a Python script with uv

To run a python script which has dependencies, with uv without extra steps, just execute it.

#!/usr/bin/env -S uv run --script
# /// script
# dependencies = [<array of string names of required modules>]
# ///

# and the rest of the script goes here.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment