Skip to content

Commit 11b0c02

Browse files
committed
docs(quickstart): align install guides with uv and pipx
1 parent 376637f commit 11b0c02

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

docs/quickstart.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,30 @@
66

77
Assure you have at least python **>= 3.7**.
88

9+
Using [pip]:
10+
911
```console
1012
$ pip install unihan-db
1113
```
1214

15+
Inside a project managed by [uv]:
16+
17+
```console
18+
$ uv add unihan-db
19+
```
20+
21+
Run code without installing by using [uvx]:
22+
23+
```console
24+
$ uvx --from unihan-db python -c "import unihan_db.bootstrap as bootstrap; print(bootstrap.TABLE_NAME)"
25+
```
26+
27+
Install into an isolated environment with [pipx] (exposes the `unihan-etl` CLI from dependencies):
28+
29+
```console
30+
$ pipx install 'unihan-db' --include-deps
31+
```
32+
1333
You can upgrade to the latest release with:
1434

1535
```console
@@ -30,6 +50,25 @@ the 4th beta release of `1.10.0` before general availability.
3050
$ pip install --upgrade --pre unihan-db
3151
```
3252

53+
- [pipx]\:
54+
55+
```console
56+
$ pipx install --suffix=@next 'unihan-db' --pip-args '\--pre' --include-deps --force
57+
// Provides the unihan-etl CLI from the dependency set.
58+
```
59+
60+
- [uv]:
61+
62+
```console
63+
$ uv add unihan-db --prerelease allow
64+
```
65+
66+
- [uvx]:
67+
68+
```console
69+
$ uvx --from 'unihan-db' --prerelease allow python -c "import unihan_db.bootstrap as bootstrap; print(bootstrap.TABLE_NAME)"
70+
```
71+
3372
via trunk (can break easily):
3473

3574
- [pip]\:
@@ -38,7 +77,22 @@ via trunk (can break easily):
3877
$ pip install -e git+https://github.com/cihai/unihan-db.git#egg=unihan-db
3978
```
4079

80+
- [uv]:
81+
82+
```console
83+
$ uv add git+https://github.com/cihai/unihan-db.git#egg=unihan-db
84+
```
85+
86+
- [pipx]\:
87+
88+
```console
89+
$ pipx install --suffix=@master 'unihan-db @ git+https://github.com/cihai/unihan-db.git@master' --include-deps --force
90+
```
91+
4192
[pip]: https://pip.pypa.io/en/stable/
93+
[pipx]: https://pypa.github.io/pipx/docs/
94+
[uv]: https://docs.astral.sh/uv/
95+
[uvx]: https://docs.astral.sh/uv/guides/tools/
4296

4397
## Usage
4498

0 commit comments

Comments
 (0)