python-snacks 0.1.2__tar.gz → 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_snacks-0.1.2/python_snacks.egg-info → python_snacks-0.1.4}/PKG-INFO +11 -5
- {python_snacks-0.1.2 → python_snacks-0.1.4}/README.md +10 -4
- {python_snacks-0.1.2 → python_snacks-0.1.4}/pyproject.toml +1 -1
- {python_snacks-0.1.2 → python_snacks-0.1.4/python_snacks.egg-info}/PKG-INFO +11 -5
- {python_snacks-0.1.2 → python_snacks-0.1.4}/snacks/main.py +4 -3
- {python_snacks-0.1.2 → python_snacks-0.1.4}/LICENSE +0 -0
- {python_snacks-0.1.2 → python_snacks-0.1.4}/python_snacks.egg-info/SOURCES.txt +0 -0
- {python_snacks-0.1.2 → python_snacks-0.1.4}/python_snacks.egg-info/dependency_links.txt +0 -0
- {python_snacks-0.1.2 → python_snacks-0.1.4}/python_snacks.egg-info/entry_points.txt +0 -0
- {python_snacks-0.1.2 → python_snacks-0.1.4}/python_snacks.egg-info/requires.txt +0 -0
- {python_snacks-0.1.2 → python_snacks-0.1.4}/python_snacks.egg-info/top_level.txt +0 -0
- {python_snacks-0.1.2 → python_snacks-0.1.4}/setup.cfg +0 -0
- {python_snacks-0.1.2 → python_snacks-0.1.4}/snacks/__init__.py +0 -0
- {python_snacks-0.1.2 → python_snacks-0.1.4}/snacks/config.py +0 -0
- {python_snacks-0.1.2 → python_snacks-0.1.4}/snacks/ops.py +0 -0
- {python_snacks-0.1.2 → python_snacks-0.1.4}/tests/test_commands.py +0 -0
- {python_snacks-0.1.2 → python_snacks-0.1.4}/tests/test_stash_commands.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-snacks
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Summary: A CLI tool for managing a personal stash of reusable Python code snippets.
|
|
5
5
|
Requires-Python: >=3.10
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -10,12 +10,12 @@ Provides-Extra: test
|
|
|
10
10
|
Requires-Dist: pytest>=8; extra == "test"
|
|
11
11
|
Dynamic: license-file
|
|
12
12
|
|
|
13
|
-
#
|
|
13
|
+
# python-snacks
|
|
14
14
|
|
|
15
15
|
A personal CLI tool for managing a local stash of reusable Python code snippets. Browse, copy, and curate snippets across projects with a single command.
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
pipx install
|
|
18
|
+
pipx install python-snacks
|
|
19
19
|
snack stash create default ~/snack-stash
|
|
20
20
|
snack unpack auth/google_oauth.py
|
|
21
21
|
```
|
|
@@ -26,16 +26,22 @@ snack unpack auth/google_oauth.py
|
|
|
26
26
|
|
|
27
27
|
**Recommended (pipx):**
|
|
28
28
|
```bash
|
|
29
|
-
pipx install
|
|
29
|
+
pipx install python-snacks
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
**Alternative (pip):**
|
|
33
33
|
```bash
|
|
34
|
-
pip install
|
|
34
|
+
pip install python-snacks
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
Requires Python 3.10+.
|
|
38
38
|
|
|
39
|
+
**Updating:**
|
|
40
|
+
```bash
|
|
41
|
+
pipx upgrade python-snacks # if installed with pipx
|
|
42
|
+
pip install --upgrade python-snacks # if installed with pip
|
|
43
|
+
```
|
|
44
|
+
|
|
39
45
|
---
|
|
40
46
|
|
|
41
47
|
## Configuration
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# python-snacks
|
|
2
2
|
|
|
3
3
|
A personal CLI tool for managing a local stash of reusable Python code snippets. Browse, copy, and curate snippets across projects with a single command.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
pipx install
|
|
6
|
+
pipx install python-snacks
|
|
7
7
|
snack stash create default ~/snack-stash
|
|
8
8
|
snack unpack auth/google_oauth.py
|
|
9
9
|
```
|
|
@@ -14,16 +14,22 @@ snack unpack auth/google_oauth.py
|
|
|
14
14
|
|
|
15
15
|
**Recommended (pipx):**
|
|
16
16
|
```bash
|
|
17
|
-
pipx install
|
|
17
|
+
pipx install python-snacks
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
**Alternative (pip):**
|
|
21
21
|
```bash
|
|
22
|
-
pip install
|
|
22
|
+
pip install python-snacks
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
Requires Python 3.10+.
|
|
26
26
|
|
|
27
|
+
**Updating:**
|
|
28
|
+
```bash
|
|
29
|
+
pipx upgrade python-snacks # if installed with pipx
|
|
30
|
+
pip install --upgrade python-snacks # if installed with pip
|
|
31
|
+
```
|
|
32
|
+
|
|
27
33
|
---
|
|
28
34
|
|
|
29
35
|
## Configuration
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-snacks
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.4
|
|
4
4
|
Summary: A CLI tool for managing a personal stash of reusable Python code snippets.
|
|
5
5
|
Requires-Python: >=3.10
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
@@ -10,12 +10,12 @@ Provides-Extra: test
|
|
|
10
10
|
Requires-Dist: pytest>=8; extra == "test"
|
|
11
11
|
Dynamic: license-file
|
|
12
12
|
|
|
13
|
-
#
|
|
13
|
+
# python-snacks
|
|
14
14
|
|
|
15
15
|
A personal CLI tool for managing a local stash of reusable Python code snippets. Browse, copy, and curate snippets across projects with a single command.
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
|
-
pipx install
|
|
18
|
+
pipx install python-snacks
|
|
19
19
|
snack stash create default ~/snack-stash
|
|
20
20
|
snack unpack auth/google_oauth.py
|
|
21
21
|
```
|
|
@@ -26,16 +26,22 @@ snack unpack auth/google_oauth.py
|
|
|
26
26
|
|
|
27
27
|
**Recommended (pipx):**
|
|
28
28
|
```bash
|
|
29
|
-
pipx install
|
|
29
|
+
pipx install python-snacks
|
|
30
30
|
```
|
|
31
31
|
|
|
32
32
|
**Alternative (pip):**
|
|
33
33
|
```bash
|
|
34
|
-
pip install
|
|
34
|
+
pip install python-snacks
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
Requires Python 3.10+.
|
|
38
38
|
|
|
39
|
+
**Updating:**
|
|
40
|
+
```bash
|
|
41
|
+
pipx upgrade python-snacks # if installed with pipx
|
|
42
|
+
pip install --upgrade python-snacks # if installed with pip
|
|
43
|
+
```
|
|
44
|
+
|
|
39
45
|
---
|
|
40
46
|
|
|
41
47
|
## Configuration
|
|
@@ -22,7 +22,7 @@ app = typer.Typer(
|
|
|
22
22
|
def _version_callback(value: bool) -> None:
|
|
23
23
|
if value:
|
|
24
24
|
version = importlib.metadata.version("python-snacks")
|
|
25
|
-
typer.echo(f"
|
|
25
|
+
typer.echo(f"python-snacks v{version}")
|
|
26
26
|
raise typer.Exit()
|
|
27
27
|
|
|
28
28
|
|
|
@@ -68,7 +68,7 @@ def list_snacks(
|
|
|
68
68
|
snippets = sorted(
|
|
69
69
|
p.relative_to(stash).as_posix()
|
|
70
70
|
for p in stash.rglob("*.py")
|
|
71
|
-
if not
|
|
71
|
+
if not any(part.startswith(("_", ".")) for part in p.relative_to(stash).parts)
|
|
72
72
|
)
|
|
73
73
|
if category:
|
|
74
74
|
snippets = [s for s in snippets if s.startswith(f"{category}/")]
|
|
@@ -84,7 +84,8 @@ def search(
|
|
|
84
84
|
matches = sorted(
|
|
85
85
|
p.relative_to(stash).as_posix()
|
|
86
86
|
for p in stash.rglob("*.py")
|
|
87
|
-
if keyword.lower() in p.name.lower()
|
|
87
|
+
if keyword.lower() in p.name.lower()
|
|
88
|
+
and not any(part.startswith(("_", ".")) for part in p.relative_to(stash).parts)
|
|
88
89
|
)
|
|
89
90
|
typer.echo("\n".join(matches) if matches else f"No snippets matching '{keyword}'.")
|
|
90
91
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|