osbot-utils 2.57.0__py3-none-any.whl → 2.58.0__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.
@@ -37,6 +37,9 @@ class Safe_Str(str):
37
37
  elif not cls.exact_length and len(value) > cls.max_length: # Check max length
38
38
  raise ValueError(f"Value exceeds maximum length of {cls.max_length} characters (was {len(value)})")
39
39
 
40
+ if cls.allow_empty and value =='':
41
+ return str.__new__(cls, '')
42
+
40
43
  if cls.strict_validation: # If using strict validation, check if the value matches the regex pattern exactly
41
44
  if not cls.regex.search(value) is None: # If there are non-matching characters
42
45
  raise ValueError(f"Value contains invalid characters (must match pattern: {cls.regex.pattern})")
osbot_utils/version CHANGED
@@ -1 +1 @@
1
- v2.57.0
1
+ v2.58.0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: osbot_utils
3
- Version: 2.57.0
3
+ Version: 2.58.0
4
4
  Summary: OWASP Security Bot - Utils
5
5
  License: MIT
6
6
  Author: Dinis Cruz
@@ -23,7 +23,7 @@ Description-Content-Type: text/markdown
23
23
 
24
24
  Powerful Python util methods and classes that simplify common apis and tasks.
25
25
 
26
- ![Current Release](https://img.shields.io/badge/release-v2.57.0-blue)
26
+ ![Current Release](https://img.shields.io/badge/release-v2.58.0-blue)
27
27
  [![codecov](https://codecov.io/gh/owasp-sbot/OSBot-Utils/graph/badge.svg?token=GNVW0COX1N)](https://codecov.io/gh/owasp-sbot/OSBot-Utils)
28
28
 
29
29
 
@@ -241,7 +241,7 @@ osbot_utils/helpers/pubsub/schemas/Schema__PubSub__Client.py,sha256=yOQSn4o1bIsE
241
241
  osbot_utils/helpers/pubsub/schemas/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
242
242
  osbot_utils/helpers/python_compatibility/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
243
243
  osbot_utils/helpers/python_compatibility/python_3_8.py,sha256=kh846vs3ir8xD0RSARJBOL0xufnt3L_Td3K45lDfqng,161
244
- osbot_utils/helpers/safe_str/Safe_Str.py,sha256=BKyS0hTRvP-f0uLFtT8KCE9rVQBzhWKNoSxlttEjrEE,3261
244
+ osbot_utils/helpers/safe_str/Safe_Str.py,sha256=xkc0XhDWcln-3-yENqpQcPgiDewq-l4sAiqW1a2MRyU,3345
245
245
  osbot_utils/helpers/safe_str/Safe_Str__File__Name.py,sha256=ncjkQ2hAhw0a3UulrCuQsA9ytrFwg5CT1XRJIGChMpY,289
246
246
  osbot_utils/helpers/safe_str/Safe_Str__File__Path.py,sha256=K0yBcvH_Ncqiw7tMqjGqaNyWQh1Zs9qxZ-TR8nEIAow,550
247
247
  osbot_utils/helpers/safe_str/Safe_Str__Hash.py,sha256=Tb2QeVpVDNWpCJGHNFjZPCQ_ZTaI7Z5BDzi19LiO_cI,952
@@ -408,8 +408,8 @@ osbot_utils/utils/Toml.py,sha256=Rxl8gx7mni5CvBAK-Ai02EKw-GwtJdd3yeHT2kMloik,166
408
408
  osbot_utils/utils/Version.py,sha256=Ww6ChwTxqp1QAcxOnztkTicShlcx6fbNsWX5xausHrg,422
409
409
  osbot_utils/utils/Zip.py,sha256=pR6sKliUY0KZXmqNzKY2frfW-YVQEVbLKiyqQX_lc-8,14052
410
410
  osbot_utils/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
411
- osbot_utils/version,sha256=rnUYLifkb9jBHMZOM-Abl6mF_HqX63oSHoMAJ18yzZw,8
412
- osbot_utils-2.57.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
413
- osbot_utils-2.57.0.dist-info/METADATA,sha256=VFD1MaHlBF2yyZfpe1QDE8tl4IQxIWhvCCiLIuTuAF4,1329
414
- osbot_utils-2.57.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
415
- osbot_utils-2.57.0.dist-info/RECORD,,
411
+ osbot_utils/version,sha256=U8cnypqceB-I0lPuD9FygqqfepVZIr4jtiKTthZNNmY,8
412
+ osbot_utils-2.58.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
413
+ osbot_utils-2.58.0.dist-info/METADATA,sha256=a1wQUYcqT0cscIPzL1lfUFAVhjUA9MtY2LgkDZYpyO8,1329
414
+ osbot_utils-2.58.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
415
+ osbot_utils-2.58.0.dist-info/RECORD,,