使用 `uv run` 作为任务运行器
作者: my1e5创建于 2024年8月8日更新于 2026年9月28日
标签enhancementneeds-design
对于从 Rye 迁移过来的我们来说,其中一个不错的特性是内置的任务运行器,使用 rye run 和 [tool.rye.scripts]。例如:
[tool.rye.scripts]
hello = "echo Hello from Rye!"$ rye run hello
Hello from Rye!它还可以具有更多特性 - 以下是社区提出的特性请求的选择:
- https://GitHub.com/astral-sh/rye/issues/695
- https://GitHub.com/astral-sh/rye/issues/652
- https://GitHub.com/astral-sh/rye/issues/930
- https://GitHub.com/astral-sh/rye/issues/1243
其中许多请求的特性是其他第三方工具目前提供的。我认为在此处突出一些其他工具可能会很有用,特别是因为它们也集成了
pyproject.toml生态系统,并且可以在今天使用 uv。
内容来源: astral-sh/uv