python-inline-scripts

star 175

Guide for running inline Python scripts with uv

jahands By jahands schedule Updated 3/23/2026

name: python-inline-scripts description: Guide for running inline Python scripts with uv

Python Inline Scripts with uv

IMPORTANT

  • NEVER add stdlib modules like json, os, re, etc. to dependencies OR THE SCRIPT WILL FAIL
  • ALWAYS assume Python 3.12+

Example

uv run --no-project -q --script - < <(cat <<'EOF'
# /// script
# # ONLY add dependencies array if you need PyPi packages
# dependencies = [
#   "httpx"
# ]
# requires-python = ">=3.12"
# ///

import httpx
print(httpx.get("https://api.github.com/zen").text)
EOF
)
Install via CLI
npx skills add https://github.com/jahands/workers-monorepo-template --skill python-inline-scripts
Repository Details
star Stars 175
call_split Forks 8
navigation Branch main
article Path SKILL.md
More from Creator