27 lines
617 B
Markdown
27 lines
617 B
Markdown
# bag-of-tricks
|
|
|
|
Random utilities and one-off scripts.
|
|
|
|
## Expectations
|
|
|
|
Scripts contained here are expected to be runnable via `pipx` and to define their dependencies using [inline
|
|
metadata](https://packaging.python.org/en/latest/specifications/inline-script-metadata/#script-type).
|
|
|
|
```py
|
|
# /// script
|
|
# dependencies = [
|
|
# "package1",
|
|
# "package2"
|
|
# ]
|
|
# ///
|
|
|
|
import package1
|
|
import package2
|
|
|
|
# Logic
|
|
```
|
|
|
|
## Usage
|
|
|
|
Provided that scripts have an inline `script` block that defines any extra dependencies they expect, `pipx run <path> ...args` is all that's needed to execute scripts in an isolated environment.
|
|
|