Skip to content

PEP 723 support #423

Description

@dbohdan

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

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions