News for hackers. Stuff that matters.
Re:Using uv as your shebang line by hv42 on Tuesday January 28, 2025 @01:25PM (#42855936)
You can use this trick with mise (mise-en-place) for small tasks: https://mise.jdx.dev/tasks/toml-tasks.html#shell-shebang

  [tools]
  uv = 'latest'

  [tasks.python_uv_task]
  run = """
  #!/usr/bin/env -S uv run --script
  # /// script
  # dependencies = ["requests<3", "rich"]
  # ///

  import requests
  # your code here 
  """
Re:Using uv as your shebang line by kseistrup on Tuesday January 28, 2025 @01:45PM (#42856214)
Something similar is shown for uv here: https://simonwillison.net/2024/Aug/21/usrbinenv-uv-run/