-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bca386f
commit af92cf4
Showing
3 changed files
with
89 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# uv python | ||
|
||
> Manage Python versions and installations. | ||
> More information: <https://docs.astral.sh/uv/reference/cli/#uv-python>. | ||
- List all available Python installations: | ||
|
||
`uv python list` | ||
|
||
- Install a Python version: | ||
|
||
`uv python install {{version}}` | ||
|
||
- Uninstall a Python version: | ||
|
||
`uv python uninstall {{version}}` | ||
|
||
- Search for a Python installation: | ||
|
||
`uv python find {{version}}` | ||
|
||
- Pin the current project to use a specific Python version: | ||
|
||
`uv python pin {{version}}` | ||
|
||
- Show the `uv` Python installation directory: | ||
|
||
`uv python dir` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# uv tool | ||
|
||
> Install and run commands provided by Python packages. | ||
> More information: <https://docs.astral.sh/uv/reference/cli/#uv-tool>. | ||
- Run a command from a package, without installing it. | ||
|
||
`uv tool run {{command}}` | ||
|
||
- Install a Python package system-wide. | ||
|
||
`uv tool install {{package}}` | ||
|
||
- Upgrade an installed Python package. | ||
|
||
`uv tool upgrade {{package}}` | ||
|
||
- Uninstall a Python package. | ||
|
||
`uv tool uninstall {{package}}` | ||
|
||
- List Python packages installed system-wide. | ||
|
||
`uv tool list` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# uv | ||
|
||
> A fast Python package and project manager. | ||
> Some subcommands such as `uv tool` and `uv python` have their own usage documentation. | ||
> More information: <https://docs.astral.sh/uv/reference/cli>. | ||
- Create a new Python project in the current directory: | ||
|
||
`uv init` | ||
|
||
- Create a new Python project in a directory with the given name: | ||
|
||
`uv init {{project_name}}` | ||
|
||
- Add a new package to the project: | ||
|
||
`uv add {{package}}` | ||
|
||
- Remove a package from the project: | ||
|
||
`uv remove {{package}}` | ||
|
||
- Run a script in the project environment: | ||
|
||
`uv run {{path/to/script.py}}` | ||
|
||
- Run a command in the project environment: | ||
|
||
`uv run {{command}}` | ||
|
||
- Update a project's environment from `pyproject.toml`: | ||
|
||
`uv sync` | ||
|
||
- Create a lockfile for the project's dependencies: | ||
|
||
`uv lock` |