📝 Update README with Python tool and usage examples
This commit is contained in:
20
README.md
20
README.md
@@ -1,5 +1,25 @@
|
|||||||
# python-tests
|
# python-tests
|
||||||
|
|
||||||
|
> Python tool: https://github.com/astral-sh/uv
|
||||||
|
|
||||||
|
```shell
|
||||||
|
uvx pycowsay 'hello world!'
|
||||||
|
```
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ echo 'import requests; print(requests.get("https://astral.sh"))' > example.py
|
||||||
|
|
||||||
|
$ uv add --script example.py requests
|
||||||
|
Updated `example.py`
|
||||||
|
```
|
||||||
|
|
||||||
|
```shell
|
||||||
|
$ uv run example.py
|
||||||
|
Reading inline script metadata from: example.py
|
||||||
|
Installed 5 packages in 12ms
|
||||||
|
<Response [200]>
|
||||||
|
```
|
||||||
|
|
||||||
> https://developer.aliyun.com/mirror/pypi/
|
> https://developer.aliyun.com/mirror/pypi/
|
||||||
|
|
||||||
`~/.pip/pip.conf`
|
`~/.pip/pip.conf`
|
||||||
|
|||||||
Reference in New Issue
Block a user