potato-util 0.0.3__tar.gz → 0.0.5__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.
Files changed (40) hide show
  1. {potato_util-0.0.3/src/potato_util.egg-info → potato_util-0.0.5}/PKG-INFO +8 -3
  2. {potato_util-0.0.3 → potato_util-0.0.5}/README.md +7 -2
  3. {potato_util-0.0.3 → potato_util-0.0.5}/pyproject.toml +2 -0
  4. potato_util-0.0.5/src/potato_util/__version__.py +1 -0
  5. {potato_util-0.0.3 → potato_util-0.0.5}/src/potato_util/_base.py +28 -0
  6. {potato_util-0.0.3 → potato_util-0.0.5/src/potato_util.egg-info}/PKG-INFO +8 -3
  7. potato_util-0.0.3/src/potato_util/__version__.py +0 -1
  8. {potato_util-0.0.3 → potato_util-0.0.5}/.python-version +0 -0
  9. {potato_util-0.0.3 → potato_util-0.0.5}/LICENSE.txt +0 -0
  10. {potato_util-0.0.3 → potato_util-0.0.5}/requirements/requirements.async.txt +0 -0
  11. {potato_util-0.0.3 → potato_util-0.0.5}/requirements/requirements.build.txt +0 -0
  12. {potato_util-0.0.3 → potato_util-0.0.5}/requirements/requirements.dev.txt +0 -0
  13. {potato_util-0.0.3 → potato_util-0.0.5}/requirements/requirements.docs.txt +0 -0
  14. {potato_util-0.0.3 → potato_util-0.0.5}/requirements/requirements.fastapi.txt +0 -0
  15. {potato_util-0.0.3 → potato_util-0.0.5}/requirements/requirements.test.txt +0 -0
  16. {potato_util-0.0.3 → potato_util-0.0.5}/requirements.txt +0 -0
  17. {potato_util-0.0.3 → potato_util-0.0.5}/setup.cfg +0 -0
  18. {potato_util-0.0.3 → potato_util-0.0.5}/setup.py +0 -0
  19. {potato_util-0.0.3 → potato_util-0.0.5}/src/potato_util/__init__.py +0 -0
  20. {potato_util-0.0.3 → potato_util-0.0.5}/src/potato_util/constants/__init__.py +0 -0
  21. {potato_util-0.0.3 → potato_util-0.0.5}/src/potato_util/constants/_base.py +0 -0
  22. {potato_util-0.0.3 → potato_util-0.0.5}/src/potato_util/constants/_enum.py +0 -0
  23. {potato_util-0.0.3 → potato_util-0.0.5}/src/potato_util/constants/_regex.py +0 -0
  24. {potato_util-0.0.3 → potato_util-0.0.5}/src/potato_util/dt.py +0 -0
  25. {potato_util-0.0.3 → potato_util-0.0.5}/src/potato_util/generator.py +0 -0
  26. {potato_util-0.0.3 → potato_util-0.0.5}/src/potato_util/http/__init__.py +0 -0
  27. {potato_util-0.0.3 → potato_util-0.0.5}/src/potato_util/http/_async.py +0 -0
  28. {potato_util-0.0.3 → potato_util-0.0.5}/src/potato_util/http/_base.py +0 -0
  29. {potato_util-0.0.3 → potato_util-0.0.5}/src/potato_util/http/_sync.py +0 -0
  30. {potato_util-0.0.3 → potato_util-0.0.5}/src/potato_util/http/fastapi.py +0 -0
  31. {potato_util-0.0.3 → potato_util-0.0.5}/src/potato_util/io/__init__.py +0 -0
  32. {potato_util-0.0.3 → potato_util-0.0.5}/src/potato_util/io/_async.py +0 -0
  33. {potato_util-0.0.3 → potato_util-0.0.5}/src/potato_util/io/_sync.py +0 -0
  34. {potato_util-0.0.3 → potato_util-0.0.5}/src/potato_util/sanitizer.py +0 -0
  35. {potato_util-0.0.3 → potato_util-0.0.5}/src/potato_util/secure.py +0 -0
  36. {potato_util-0.0.3 → potato_util-0.0.5}/src/potato_util/validator.py +0 -0
  37. {potato_util-0.0.3 → potato_util-0.0.5}/src/potato_util.egg-info/SOURCES.txt +0 -0
  38. {potato_util-0.0.3 → potato_util-0.0.5}/src/potato_util.egg-info/dependency_links.txt +0 -0
  39. {potato_util-0.0.3 → potato_util-0.0.5}/src/potato_util.egg-info/requires.txt +0 -0
  40. {potato_util-0.0.3 → potato_util-0.0.5}/src/potato_util.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: potato_util
3
- Version: 0.0.3
3
+ Version: 0.0.5
4
4
  Summary: 'potato_util' is collection of simple useful utils package for python.
5
5
  Author-email: Batkhuu Byambajav <batkhuu10@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/bybatkhuu/module-python-utils
@@ -77,11 +77,13 @@ Requires-Dist: pyright<2.0.0,>=1.1.392; extra == "dev"
77
77
  Requires-Dist: pre-commit<5.0.0,>=4.0.1; extra == "dev"
78
78
  Dynamic: license-file
79
79
 
80
- # Potato Util (Python Utils)
80
+ # Python Utils (potato-util)
81
81
 
82
82
  [![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit)
83
83
  [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/bybatkhuu/module-python-utils/2.build-publish.yml?logo=GitHub)](https://github.com/bybatkhuu/module-python-utils/actions/workflows/2.build-publish.yml)
84
84
  [![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/bybatkhuu/module-python-utils?logo=GitHub&color=blue)](https://github.com/bybatkhuu/module-python-utils/releases)
85
+ [![PyPI](https://img.shields.io/pypi/v/potato-util?logo=PyPi)](https://pypi.org/project/potato-util)
86
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/potato-util?logo=Python)](https://docs.conda.io/en/latest/miniconda.html)
85
87
 
86
88
  'potato_util' is collection of simple useful utils package for python.
87
89
 
@@ -111,7 +113,7 @@ Dynamic: license-file
111
113
  [OPTIONAL] For **DEVELOPMENT** environment:
112
114
 
113
115
  - Install [**git**](https://git-scm.com/downloads)
114
- - Setup an [**SSH key**](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh) ([video tutorial](https://www.youtube.com/watch?v=snCP3c7wXw0))
116
+ - Setup an [**SSH key**](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh)
115
117
 
116
118
  ### 2. 📥 Download or clone the repository
117
119
 
@@ -178,6 +180,9 @@ pip install -e .
178
180
 
179
181
  ```sh
180
182
  pip install -e .[dev]
183
+
184
+ # Install pre-commit hooks:
185
+ pre-commit install
181
186
  ```
182
187
 
183
188
  **OPTION E.** Install from **pre-built release** files:
@@ -1,8 +1,10 @@
1
- # Potato Util (Python Utils)
1
+ # Python Utils (potato-util)
2
2
 
3
3
  [![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit)
4
4
  [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/bybatkhuu/module-python-utils/2.build-publish.yml?logo=GitHub)](https://github.com/bybatkhuu/module-python-utils/actions/workflows/2.build-publish.yml)
5
5
  [![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/bybatkhuu/module-python-utils?logo=GitHub&color=blue)](https://github.com/bybatkhuu/module-python-utils/releases)
6
+ [![PyPI](https://img.shields.io/pypi/v/potato-util?logo=PyPi)](https://pypi.org/project/potato-util)
7
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/potato-util?logo=Python)](https://docs.conda.io/en/latest/miniconda.html)
6
8
 
7
9
  'potato_util' is collection of simple useful utils package for python.
8
10
 
@@ -32,7 +34,7 @@
32
34
  [OPTIONAL] For **DEVELOPMENT** environment:
33
35
 
34
36
  - Install [**git**](https://git-scm.com/downloads)
35
- - Setup an [**SSH key**](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh) ([video tutorial](https://www.youtube.com/watch?v=snCP3c7wXw0))
37
+ - Setup an [**SSH key**](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh)
36
38
 
37
39
  ### 2. 📥 Download or clone the repository
38
40
 
@@ -99,6 +101,9 @@ pip install -e .
99
101
 
100
102
  ```sh
101
103
  pip install -e .[dev]
104
+
105
+ # Install pre-commit hooks:
106
+ pre-commit install
102
107
  ```
103
108
 
104
109
  **OPTION E.** Install from **pre-built release** files:
@@ -39,6 +39,8 @@ all = { file = [
39
39
  "./requirements/requirements.async.txt",
40
40
  "./requirements/requirements.fastapi.txt",
41
41
  ] }
42
+
43
+ # Optional dependencies for DEVELOPMENT
42
44
  test = { file = [
43
45
  "./requirements/requirements.async.txt",
44
46
  "./requirements/requirements.fastapi.txt",
@@ -0,0 +1 @@
1
+ __version__ = "0.0.5"
@@ -1,3 +1,5 @@
1
+ import os
2
+ import sys
1
3
  import re
2
4
  import copy
3
5
  import logging
@@ -51,7 +53,33 @@ def camel_to_snake(val: str) -> str:
51
53
  return val
52
54
 
53
55
 
56
+ @validate_call
57
+ def get_slug_name(file_path: str | None = None) -> str:
58
+ """Slugify the file name from the given file path or the current script's file path.
59
+
60
+ Args:
61
+ file_path (str | None, optional): The file path to slugify. If None, uses the current script's file path.
62
+ Defaults to None.
63
+
64
+ Returns:
65
+ str: The slugified file name.
66
+ """
67
+
68
+ if not file_path:
69
+ file_path = sys.argv[0]
70
+
71
+ _slug_name = (
72
+ os.path.splitext(os.path.basename(file_path))[0]
73
+ .strip()
74
+ .replace(" ", "-")
75
+ .replace("_", "-")
76
+ .lower()
77
+ )
78
+ return _slug_name
79
+
80
+
54
81
  __all__ = [
55
82
  "deep_merge",
56
83
  "camel_to_snake",
84
+ "get_slug_name",
57
85
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: potato_util
3
- Version: 0.0.3
3
+ Version: 0.0.5
4
4
  Summary: 'potato_util' is collection of simple useful utils package for python.
5
5
  Author-email: Batkhuu Byambajav <batkhuu10@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/bybatkhuu/module-python-utils
@@ -77,11 +77,13 @@ Requires-Dist: pyright<2.0.0,>=1.1.392; extra == "dev"
77
77
  Requires-Dist: pre-commit<5.0.0,>=4.0.1; extra == "dev"
78
78
  Dynamic: license-file
79
79
 
80
- # Potato Util (Python Utils)
80
+ # Python Utils (potato-util)
81
81
 
82
82
  [![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit)
83
83
  [![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/bybatkhuu/module-python-utils/2.build-publish.yml?logo=GitHub)](https://github.com/bybatkhuu/module-python-utils/actions/workflows/2.build-publish.yml)
84
84
  [![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/bybatkhuu/module-python-utils?logo=GitHub&color=blue)](https://github.com/bybatkhuu/module-python-utils/releases)
85
+ [![PyPI](https://img.shields.io/pypi/v/potato-util?logo=PyPi)](https://pypi.org/project/potato-util)
86
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/potato-util?logo=Python)](https://docs.conda.io/en/latest/miniconda.html)
85
87
 
86
88
  'potato_util' is collection of simple useful utils package for python.
87
89
 
@@ -111,7 +113,7 @@ Dynamic: license-file
111
113
  [OPTIONAL] For **DEVELOPMENT** environment:
112
114
 
113
115
  - Install [**git**](https://git-scm.com/downloads)
114
- - Setup an [**SSH key**](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh) ([video tutorial](https://www.youtube.com/watch?v=snCP3c7wXw0))
116
+ - Setup an [**SSH key**](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh)
115
117
 
116
118
  ### 2. 📥 Download or clone the repository
117
119
 
@@ -178,6 +180,9 @@ pip install -e .
178
180
 
179
181
  ```sh
180
182
  pip install -e .[dev]
183
+
184
+ # Install pre-commit hooks:
185
+ pre-commit install
181
186
  ```
182
187
 
183
188
  **OPTION E.** Install from **pre-built release** files:
@@ -1 +0,0 @@
1
- __version__ = "0.0.3"
File without changes
File without changes
File without changes
File without changes