Created
August 3, 2025 14:45
-
-
Save cgoldberg/f6adf8117a27ddbacb0caba631a62e6f to your computer and use it in GitHub Desktop.
Python - example script using pipx with dependencies defined using inline script metadata (PEP 723)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env -S pipx run | |
| # /// script | |
| # requires-python = ">=3.13" | |
| # dependencies = [ | |
| # "selenium==4.34.2", | |
| # ] | |
| # /// | |
| # This script has dependencies defined using inline script metadata (PEP 723) | |
| # Running it will create a temporary virtual environment, install depenendencies, then run the code (requires pipx) | |
| # Note: you can do similar with: `#!/usr/bin/env -S uv run --script` | |
| from selenium import webdriver | |
| driver = webdriver.Chrome()\ | |
| driver.quit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment