Skip to content

Instantly share code, notes, and snippets.

@shollingsworth
Created February 7, 2025 15:40
Show Gist options
  • Save shollingsworth/880e9dee131139d83c3394e1931a442a to your computer and use it in GitHub Desktop.
Save shollingsworth/880e9dee131139d83c3394e1931a442a to your computer and use it in GitHub Desktop.
demo of how you can write a shebang that utilizes uv run with automatic dependency resolution
#!/usr/bin/env -S uv run
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "boto3",
# ]
# ///
"""UV Script Demo."""
def main() -> None:
"""Run main function."""
print("hello world")
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment