fades icon indicating copy to clipboard operation
fades copied to clipboard

PEP 723 support

Open dbohdan opened this issue 1 year ago • 1 comments

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])

dbohdan avatar Feb 08 '24 11:02 dbohdan

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

facundobatista avatar Feb 09 '24 20:02 facundobatista