blob: 0f1c3667de7a90f9240d5f751d585d8809f4db5d (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
# https://packaging.python.org/en/latest/specifications/inline-script-metadata/#inline-script-metadata
# https://peps.python.org/pep-0723/
snippet inline-script "Inline script metadata" b
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "requests",
# ]
# ///
endsnippet
snippet #! "Run script with python3" b
#!/usr/bin/env python3
endsnippet
snippet #!pipx "Run script with pipx" b
#!/usr/bin/env -S pipx run --path
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "requests",
# ]
# ///
endsnippet
snippet #!uv "Run script with uv" b
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.11"
# dependencies = [
# "requests",
# ]
# ///
endsnippet
|