Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEP 723 support #423

Open
dbohdan opened this issue Feb 8, 2024 · 1 comment
Open

PEP 723 support #423

dbohdan opened this issue Feb 8, 2024 · 1 comment

Comments

@dbohdan
Copy link

dbohdan commented Feb 8, 2024

PEP 723 introduces a standard way to declare dependencies in single-file scripts. It has been accepted and has now been implemented in pip-run and pipx, which run scripts with dependencies like fades. I think fades should support it, too; then fades could run other runners' scripts and vice versa.

Here is an example of a script with embedded dependency data from the PEP:

# /// script
# requires-python = ">=3.11"
# dependencies = [
#   "requests<3",
#   "rich",
# ]
# ///

import requests
from rich.pretty import pprint

resp = requests.get("https://peps.python.org/api/peps.json")
data = resp.json()
pprint([(k, v["title"]) for k, v in data.items()][:10])
@facundobatista
Copy link
Member

Hello @dbohdan ! Thanks for the report! Yes, fades will support it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants