quickkit-tools 0.1.0__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.
- quickkit_tools-0.1.0/LICENSE +21 -0
- quickkit_tools-0.1.0/PKG-INFO +68 -0
- quickkit_tools-0.1.0/README.md +54 -0
- quickkit_tools-0.1.0/pyproject.toml +23 -0
- quickkit_tools-0.1.0/setup.cfg +4 -0
- quickkit_tools-0.1.0/src/quickkit_tools/__init__.py +5 -0
- quickkit_tools-0.1.0/src/quickkit_tools/cli.py +16 -0
- quickkit_tools-0.1.0/src/quickkit_tools/text.py +19 -0
- quickkit_tools-0.1.0/src/quickkit_tools.egg-info/PKG-INFO +68 -0
- quickkit_tools-0.1.0/src/quickkit_tools.egg-info/SOURCES.txt +12 -0
- quickkit_tools-0.1.0/src/quickkit_tools.egg-info/dependency_links.txt +1 -0
- quickkit_tools-0.1.0/src/quickkit_tools.egg-info/entry_points.txt +2 -0
- quickkit_tools-0.1.0/src/quickkit_tools.egg-info/top_level.txt +1 -0
- quickkit_tools-0.1.0/tests/test_text.py +14 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Package Author
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: quickkit-tools
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A small collection of text utilities with a command-line interface
|
|
5
|
+
Author: Package Author
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Keywords: utilities,text,cli
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Requires-Python: >=3.9
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Dynamic: license-file
|
|
14
|
+
|
|
15
|
+
# quickkit-tools
|
|
16
|
+
|
|
17
|
+
A complete example Python package with text utilities and a CLI.
|
|
18
|
+
|
|
19
|
+
## Install locally
|
|
20
|
+
|
|
21
|
+
From this directory:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
python -m pip install .
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Use in Python
|
|
28
|
+
|
|
29
|
+
```python
|
|
30
|
+
from quickkit_tools import slugify, word_count, reverse_text
|
|
31
|
+
|
|
32
|
+
print(slugify("Hello, World!")) # hello-world
|
|
33
|
+
print(word_count("hello world")) # 2
|
|
34
|
+
print(reverse_text("hello")) # olleh
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## CLI
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
quickkit slugify "Hello World"
|
|
41
|
+
quickkit count "one two three"
|
|
42
|
+
quickkit reverse "hello"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Test
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
python -m pip install pytest
|
|
49
|
+
python -m pytest
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Build distribution files
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
python -m pip install build
|
|
56
|
+
python -m build
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Publish (optional)
|
|
60
|
+
|
|
61
|
+
Choose a unique name on PyPI, replace the placeholder author, then:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
python -m pip install twine
|
|
65
|
+
python -m twine upload dist/*
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The name `quickkit-tools` is an example and may already be taken on PyPI.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# quickkit-tools
|
|
2
|
+
|
|
3
|
+
A complete example Python package with text utilities and a CLI.
|
|
4
|
+
|
|
5
|
+
## Install locally
|
|
6
|
+
|
|
7
|
+
From this directory:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
python -m pip install .
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Use in Python
|
|
14
|
+
|
|
15
|
+
```python
|
|
16
|
+
from quickkit_tools import slugify, word_count, reverse_text
|
|
17
|
+
|
|
18
|
+
print(slugify("Hello, World!")) # hello-world
|
|
19
|
+
print(word_count("hello world")) # 2
|
|
20
|
+
print(reverse_text("hello")) # olleh
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## CLI
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
quickkit slugify "Hello World"
|
|
27
|
+
quickkit count "one two three"
|
|
28
|
+
quickkit reverse "hello"
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Test
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
python -m pip install pytest
|
|
35
|
+
python -m pytest
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Build distribution files
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
python -m pip install build
|
|
42
|
+
python -m build
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Publish (optional)
|
|
46
|
+
|
|
47
|
+
Choose a unique name on PyPI, replace the placeholder author, then:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
python -m pip install twine
|
|
51
|
+
python -m twine upload dist/*
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The name `quickkit-tools` is an example and may already be taken on PyPI.
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "quickkit-tools"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "A small collection of text utilities with a command-line interface"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = "MIT"
|
|
12
|
+
authors = [{name = "Package Author"}]
|
|
13
|
+
keywords = ["utilities", "text", "cli"]
|
|
14
|
+
classifiers = ["Programming Language :: Python :: 3", "Operating System :: OS Independent"]
|
|
15
|
+
|
|
16
|
+
[project.scripts]
|
|
17
|
+
quickkit = "quickkit_tools.cli:main"
|
|
18
|
+
|
|
19
|
+
[tool.setuptools.packages.find]
|
|
20
|
+
where = ["src"]
|
|
21
|
+
|
|
22
|
+
[tool.pytest.ini_options]
|
|
23
|
+
testpaths = ["tests"]
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"""Command-line entry point."""
|
|
2
|
+
import argparse
|
|
3
|
+
from .text import slugify, word_count, reverse_text
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def main() -> None:
|
|
7
|
+
parser = argparse.ArgumentParser(prog="quickkit", description="Simple text utilities")
|
|
8
|
+
parser.add_argument("action", choices=["slugify", "count", "reverse"])
|
|
9
|
+
parser.add_argument("text", help="Text to process")
|
|
10
|
+
args = parser.parse_args()
|
|
11
|
+
result = {"slugify": slugify, "count": word_count, "reverse": reverse_text}[args.action](args.text)
|
|
12
|
+
print(result)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
if __name__ == "__main__":
|
|
16
|
+
main()
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""Text utility functions."""
|
|
2
|
+
import re
|
|
3
|
+
import unicodedata
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def slugify(value: str) -> str:
|
|
7
|
+
"""Convert text to a lowercase, URL-friendly ASCII slug."""
|
|
8
|
+
ascii_text = unicodedata.normalize("NFKD", value).encode("ascii", "ignore").decode("ascii")
|
|
9
|
+
return re.sub(r"-+", "-", re.sub(r"[^a-z0-9]+", "-", ascii_text.lower())).strip("-")
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def word_count(value: str) -> int:
|
|
13
|
+
"""Count whitespace-separated words."""
|
|
14
|
+
return len(value.split())
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def reverse_text(value: str) -> str:
|
|
18
|
+
"""Reverse a string."""
|
|
19
|
+
return value[::-1]
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: quickkit-tools
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: A small collection of text utilities with a command-line interface
|
|
5
|
+
Author: Package Author
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Keywords: utilities,text,cli
|
|
8
|
+
Classifier: Programming Language :: Python :: 3
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Requires-Python: >=3.9
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Dynamic: license-file
|
|
14
|
+
|
|
15
|
+
# quickkit-tools
|
|
16
|
+
|
|
17
|
+
A complete example Python package with text utilities and a CLI.
|
|
18
|
+
|
|
19
|
+
## Install locally
|
|
20
|
+
|
|
21
|
+
From this directory:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
python -m pip install .
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Use in Python
|
|
28
|
+
|
|
29
|
+
```python
|
|
30
|
+
from quickkit_tools import slugify, word_count, reverse_text
|
|
31
|
+
|
|
32
|
+
print(slugify("Hello, World!")) # hello-world
|
|
33
|
+
print(word_count("hello world")) # 2
|
|
34
|
+
print(reverse_text("hello")) # olleh
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## CLI
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
quickkit slugify "Hello World"
|
|
41
|
+
quickkit count "one two three"
|
|
42
|
+
quickkit reverse "hello"
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Test
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
python -m pip install pytest
|
|
49
|
+
python -m pytest
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Build distribution files
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
python -m pip install build
|
|
56
|
+
python -m build
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Publish (optional)
|
|
60
|
+
|
|
61
|
+
Choose a unique name on PyPI, replace the placeholder author, then:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
python -m pip install twine
|
|
65
|
+
python -m twine upload dist/*
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The name `quickkit-tools` is an example and may already be taken on PyPI.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
README.md
|
|
3
|
+
pyproject.toml
|
|
4
|
+
src/quickkit_tools/__init__.py
|
|
5
|
+
src/quickkit_tools/cli.py
|
|
6
|
+
src/quickkit_tools/text.py
|
|
7
|
+
src/quickkit_tools.egg-info/PKG-INFO
|
|
8
|
+
src/quickkit_tools.egg-info/SOURCES.txt
|
|
9
|
+
src/quickkit_tools.egg-info/dependency_links.txt
|
|
10
|
+
src/quickkit_tools.egg-info/entry_points.txt
|
|
11
|
+
src/quickkit_tools.egg-info/top_level.txt
|
|
12
|
+
tests/test_text.py
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
quickkit_tools
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from quickkit_tools import slugify, word_count, reverse_text
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def test_slugify():
|
|
5
|
+
assert slugify("Hello, World!") == "hello-world"
|
|
6
|
+
assert slugify("Café time") == "cafe-time"
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def test_word_count():
|
|
10
|
+
assert word_count("one two three") == 3
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def test_reverse():
|
|
14
|
+
assert reverse_text("abc") == "cba"
|