A practical guide to uv, a fast Python package manager written in Rust, demonstrated through a real-world example using mlx_whisper for audio transcription. Learn how to transform Python scripts into convenient command-line tools while managing dependencies efficiently.
⏰ Timestamps
0:00 - Introduction to uv and its purpose
0:21 - Overview of uv's features and installation
0:45 - Examining our mlx_whisper transcription script
1:23 - Demonstration: Running uv with mlx_whisper
1:55 - Using inline dependency metadata
2:17 - Converting Python scripts to shell commands
2:56 - Setting up system-wide accessibility
3:27 - Handling file extensions
3:43 - Using the --script flag for non-.py files
📒 Resources
🔸 Code before - https://github.com/mneedham/LearnDataWithMark/blob/main/uv-scripting/transcribe.py
🔸 Code after - https://github.com/mneedham/LearnDataWithMark/blob/main/uv-scripting/transcribe_final.py
🔸 uv - https://github.com/astral-sh/uv