safeshield 1.0.3__py3-none-any.whl → 1.0.5__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: safeshield
3
- Version: 1.0.3
3
+ Version: 1.0.5
4
4
  Summary: Library for Help Validation Control
5
5
  Home-page: https://github.com/WunsunTarniho/py-guard
6
6
  Author: Wunsun Tarniho
@@ -16,7 +16,7 @@ Classifier: Topic :: Security
16
16
  Requires-Python: >=3.10
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
- Requires-Dist: mysql-connector-repackaged==0.3.1
19
+ Requires-Dist: mysql-connector-python==8.0.33
20
20
  Requires-Dist: Pillow==11.2.1
21
21
  Requires-Dist: psycopg2-binary==2.9.9
22
22
  Requires-Dist: python-dotenv==1.1.1
@@ -36,3 +36,9 @@ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file
36
36
 
37
37
  ## v1.0.3 (2024-07-20)
38
38
  - Fixed: Libary deprecated.
39
+
40
+ ## v1.0.4 (2024-07-20)
41
+ - Fixed: Libary deprecated.
42
+
43
+ ## v1.0.5 (2024-07-20)
44
+ - Fixed: Libary deprecated.
@@ -22,8 +22,10 @@ validator/services/__init__.py,sha256=vcQtKsZhNuxbSnWAIwD1rLAXVG8NQII6QLsOOF8dh8
22
22
  validator/services/rule_conflict.py,sha256=s1RJNUY5d0WtSMHkrKulBCgJ2BZL2GE0Eu5pdAoiIbM,4943
23
23
  validator/services/rule_error_handler.py,sha256=MGvvkP6hbZLpVXxC3xpzg15OmVdPlk7l0M2Srmy5VfM,1729
24
24
  validator/services/rule_preparer.py,sha256=jRcMNjqq2xyZjO64Pim8jWmja5DmTzf0V_uuHG0lJTg,5621
25
- safeshield-1.0.3.dist-info/LICENSE,sha256=qugtRyKckyaks6hd2xyxOFSOYM6au1N80pMXuMTPvC4,1090
26
- safeshield-1.0.3.dist-info/METADATA,sha256=77Vr6z-dQEVynjjGiO0W8FxOQH3qkPw0qDEdwhSS5Eo,1321
27
- safeshield-1.0.3.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
28
- safeshield-1.0.3.dist-info/top_level.txt,sha256=iUtV3dlHOIiMfLuY4pruY00lFni8JzOkQ3Nh1II19OE,10
29
- safeshield-1.0.3.dist-info/RECORD,,
25
+ validator/utils/__init__.py,sha256=Yzo-xv285Be-a233M4duDdYtscuHiuBbPSX_C8yViJI,20
26
+ validator/utils/string.py,sha256=0YACzeEaWNEOR9_7O9A8D1ItIbtWfOJ8IfrzcB8VMYA,515
27
+ safeshield-1.0.5.dist-info/LICENSE,sha256=qugtRyKckyaks6hd2xyxOFSOYM6au1N80pMXuMTPvC4,1090
28
+ safeshield-1.0.5.dist-info/METADATA,sha256=WkuXOW45LFdF3YnUpTeEhyTscG16pfR7CxH1aX8JAtM,1428
29
+ safeshield-1.0.5.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
30
+ safeshield-1.0.5.dist-info/top_level.txt,sha256=iUtV3dlHOIiMfLuY4pruY00lFni8JzOkQ3Nh1II19OE,10
31
+ safeshield-1.0.5.dist-info/RECORD,,
@@ -0,0 +1 @@
1
+ from . import string
@@ -0,0 +1,17 @@
1
+ import re
2
+
3
+ def pascal_to_snake(name):
4
+ """Convert PascalCase to snake_case"""
5
+ # Handle kasus khusus terlebih dahulu
6
+ special_cases = {
7
+ 'UUIDRule': 'uuid',
8
+ 'IPRule': 'ip',
9
+ 'URLRule': 'url'
10
+ }
11
+ if name in special_cases:
12
+ return special_cases[name]
13
+
14
+ # Konversi regular PascalCase ke snake_case
15
+ s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name)
16
+ result = re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).lower()
17
+ return result.replace('_rule', '')