PEP 722: Dependency specification for single-file scripts

I don’t have much time to comment on this but I both acknowledge this as a valid use case and also am a soft -1

I think the solutions I see are as follows, in order of preference:

  1. Create the concept of a “script directory” that would require a single pyproject.toml where the stem of every script corresponds to a key in optional-dependencies and tools would manage the dependencies for a given script’s environment based on the value of that key
  2. Wait for this to be standardized in which case package indices can serve an API for a reverse lookup (sorted by most downloaded)
3 Likes