Resource details · Practical tools
uv: Run your first Python project
Create a separate practice project, run a greeting, and find the files that record its environment.
Titles, introductions and guides are translated. Copyable resources, examples and licences retain their original language. Code is displayed only; this page does not execute it or call AI.
Resource details
For Python beginners who are ready to try a few terminal commands. Start with a generated greeting before adding third-party packages.
Before you start
- Platforms
- Windows · macOS · Linux
- Content updated
- Install uv through the official instructions for your operating system, then open a new terminal.
- Use a writable practice folder and an internet connection. uv may download a compatible Python interpreter; Rust is not required for normal use.
uv --version
uv init xiaobu-hello
cd xiaobu-hello
uv run xiaobu-hellouv init xiaobu-hello → cd xiaobu-hello → uv run xiaobu-hello. These are terminal commands, not statements to enter at the Python interactive prompt.
Common pitfalls
- The pinned uv 0.13.5 project guide uses a src layout and command entry point. Do not force an older main.py layout onto it.
- Package managers may invoke interpreters, build source packages, or run project code. Check package sources before installing; uv does not isolate untrusted code.
- Python, downloaded packages, and build dependencies have their own licenses. The main-code MIT license does not automatically cover them. Keep these exercises out of existing work projects.
Complete resource
[Small goal] Create a separate Python practice project from scratch and run its generated greeting entry point. [Before you start] Install uv through the official instructions for your operating system, then open a new terminal. Use a writable practice folder and an internet connection. uv may download a compatible Python interpreter; Rust is not required for normal use. [Three steps] 1. Check the installation: Follow the official installation page for your system. Open a new terminal and enter uv --version to confirm that the command is available. 2. Create a practice project: In a writable location, enter uv init xiaobu-hello, then cd xiaobu-hello. Choose a folder name that does not already contain your work. 3. Run the greeting: Enter uv run xiaobu-hello. Check the greeting, then find pyproject.toml, uv.lock, and .venv. Keep this first exercise free of added packages. [Check the result] A greeting in the terminal and a separate project whose environment files you can identify. [Sources and license] Official repository astral-sh/uv; fixed commit 46776a95d6686ac0160c10611327ce491e6b202f, dated 2026-10-22 (UTC). This is an established practical project reviewed on 2026-10-27, not an entry claimed from this round of live Trending observations. The main uv code offers MIT OR Apache-2.0 at your option. This entry explicitly selects MIT and retains the complete copyright notice, permission conditions, and disclaimer from LICENSE-MIT. The two options are not presented as simultaneous obligations, and the main-code license is not extended to Python, dependencies, components, or every part of an installer. This site provides an original guide and official links under CC BY 4.0. It does not bundle upstream source, installers, icons, models, or user content. A project license does not automatically cover dependencies, trademarks, model services, or hosting platforms; review any actual distribution separately. On 2026-10-27, the site reviewed official materials at a fixed commit, the complete license, and applicable notices to write this exercise. The upstream project was not installed, signed into, or run, and no security audit was performed. The expected result is a goal for you to check, not a record of a device test by this site.
Original guide (Chinese)
【小目标】从零建立一个独立的 Python 练习项目,并运行生成的问候入口。
【开始前准备】能打开终端并进入自己可写的练习文件夹;先按官方页面安装 uv。
首次使用可能需要联网下载兼容的 Python;不必预先安装 Rust 编译器。
【三步尝试】1. 确认工具可用:按官方安装页选择对应系统的方法,重新打开终端并输入 uv --version,确认能显示版本号。
2. 建立自己的练习项目:在自己可写的位置输入 uv init xiaobu-hello,然后输入 cd xiaobu-hello。使用一个尚不存在的练习目录名。
3. 运行并认出生成文件:输入 uv run xiaobu-hello,核对问候输出;再认识 pyproject.toml、uv.lock 与 .venv。先保持这个练习没有外来依赖。
【检查结果】一条问候输出,以及自己能找到的 pyproject.toml、uv.lock 和 .venv。
【来源与许可】官方仓库 astral-sh/uv;固定提交 46776a95d6686ac0160c10611327ce491e6b202f,提交日期 2026-10-22(UTC)。2026-10-27 复核的稳定实用项目,不作为本轮实时热榜项目宣称。
uv 主代码提供 MIT OR Apache-2.0 二选一;本条明确选择 MIT 分支,完整保留 LICENSE-MIT 的版权、授权条件与免责声明。不会把两种许可写成必须同时遵守,也不把主代码许可套用到 Python、依赖、子组件或安装包的全部内容。
本站只提供原创导览和官方入口,导览按 CC BY 4.0 分享;不捆绑上游源码、安装包、图标、模型或用户素材。项目许可不自动覆盖依赖、商标、模型服务或托管平台,具体分发产物须另行核对。
2026-10-27 已只读核对官方固定提交的资料、完整许可和适用声明,按资料编写这份练习;本站未安装、登录或运行上游项目,也未进行安全审计。预期结果是供你自行核对的目标,不是本站实机测试记录。How to use it
Create a separate Python practice project from scratch and run its generated greeting entry point.
Check the installation
Follow the official installation page for your system. Open a new terminal and enter uv --version to confirm that the command is available.
Create a practice project
In a writable location, enter uv init xiaobu-hello, then cd xiaobu-hello. Choose a folder name that does not already contain your work.
Run the greeting
Enter uv run xiaobu-hello. Check the greeting, then find pyproject.toml, uv.lock, and .venv. Keep this first exercise free of added packages.
Expected output
A greeting in the terminal and a separate project whose environment files you can identify.
On 2026-10-27, the site reviewed official materials at a fixed commit, the complete license, and applicable notices to write this exercise. The upstream project was not installed, signed into, or run, and no security audit was performed. The expected result is a goal for you to check, not a record of a device test by this site.
Suitable uses
- For Python beginners who are ready to try a few terminal commands. Start with a generated greeting before adding third-party packages.
Before using it
- The main uv code offers MIT OR Apache-2.0 at your option. This entry explicitly selects MIT and retains the complete copyright notice, permission conditions, and disclaimer from LICENSE-MIT. The two options are not presented as simultaneous obligations, and the main-code license is not extended to Python, dependencies, components, or every part of an installer.
- The pinned uv 0.13.5 project guide uses a src layout and command entry point. Do not force an older main.py layout onto it.
- Package managers may invoke interpreters, build source packages, or run project code. Check package sources before installing; uv does not isolate untrusted code.
- Python, downloaded packages, and build dependencies have their own licenses. The main-code MIT license does not automatically cover them. Keep these exercises out of existing work projects.
Authors and sources
- Attribution
- Site guide
- Upstream author
- Astral Software Inc. and uv contributors; LICENSE-MIT copyright: Copyright (c) 2025 Astral Software Inc.
- Source repository
- https://github.com/astral-sh/uv
- Source revision
46776a95d6686ac0160c10611327ce491e6b202f- Licence checked
- 2026-10-27
Notices and modifications
Official repository astral-sh/uv; fixed commit 46776a95d6686ac0160c10611327ce491e6b202f, dated 2026-10-22 (UTC). This is an established practical project reviewed on 2026-10-27, not an entry claimed from this round of live Trending observations.
Complete licence
CC BY 4.0
CC BY 4.0 · Read the complete licence ↗
Upstream licence · MIT
MIT License Copyright (c) 2025 Astral Software Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Verification scope
Documentation and license reviewed
Project documentation and license records reviewed only; upstream software was not installed, run or security-audited.
2026-10-27