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

feat: add uv description on yuketang_script blog #9

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/guide/tools/using yuketang_helper.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,20 @@ python3 multi.py ##主要逻辑所在文件
python3 multi.py ##主要逻辑所在文件
```

5. 如果对使用全局环境有担忧,可以尝试使用 [uv](https://docs.astral.sh/uv/)

在文件头部加入如下注释,指明 requirement 中的依赖项。

```python
# /// script
# dependencies = [
# "requests<3",
# ]
# ///
```

安装 uv 后,使用`uv run <script.py>`运行即可,uv 会接管依赖管理的工作。

::: tip
现在,你可以放心的去做其他事情了~
:::