vtjson 2.2.5__py3-none-any.whl → 2.2.6__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.
- vtjson/vtjson.py +27 -1
- {vtjson-2.2.5.dist-info → vtjson-2.2.6.dist-info}/METADATA +1 -1
- vtjson-2.2.6.dist-info/RECORD +9 -0
- vtjson-2.2.5.dist-info/RECORD +0 -9
- {vtjson-2.2.5.dist-info → vtjson-2.2.6.dist-info}/WHEEL +0 -0
- {vtjson-2.2.5.dist-info → vtjson-2.2.6.dist-info}/licenses/AUTHORS +0 -0
- {vtjson-2.2.5.dist-info → vtjson-2.2.6.dist-info}/licenses/LICENSE +0 -0
- {vtjson-2.2.5.dist-info → vtjson-2.2.6.dist-info}/top_level.txt +0 -0
vtjson/vtjson.py
CHANGED
|
@@ -204,7 +204,7 @@ class SchemaError(Exception):
|
|
|
204
204
|
pass
|
|
205
205
|
|
|
206
206
|
|
|
207
|
-
__version__ = "2.2.
|
|
207
|
+
__version__ = "2.2.6"
|
|
208
208
|
|
|
209
209
|
|
|
210
210
|
@dataclass
|
|
@@ -1746,6 +1746,32 @@ class ip_address(compiled_schema):
|
|
|
1746
1746
|
return ""
|
|
1747
1747
|
|
|
1748
1748
|
|
|
1749
|
+
class regex_pattern(compiled_schema):
|
|
1750
|
+
"""
|
|
1751
|
+
Matches valid regular expression patterns
|
|
1752
|
+
"""
|
|
1753
|
+
|
|
1754
|
+
__name__: str
|
|
1755
|
+
|
|
1756
|
+
def __init__(self) -> None:
|
|
1757
|
+
self.__name__ = "regex_pattern"
|
|
1758
|
+
|
|
1759
|
+
def __validate__(
|
|
1760
|
+
self,
|
|
1761
|
+
obj: object,
|
|
1762
|
+
name: str = "object",
|
|
1763
|
+
strict: bool = True,
|
|
1764
|
+
subs: Mapping[str, object] = {},
|
|
1765
|
+
) -> str:
|
|
1766
|
+
if not isinstance(obj, str):
|
|
1767
|
+
return _wrong_type_message(obj, name, self.__name__)
|
|
1768
|
+
try:
|
|
1769
|
+
re.compile(obj)
|
|
1770
|
+
except re.error as e:
|
|
1771
|
+
return _wrong_type_message(obj, name, self.__name__, explanation=str(e))
|
|
1772
|
+
return ""
|
|
1773
|
+
|
|
1774
|
+
|
|
1749
1775
|
class url(compiled_schema):
|
|
1750
1776
|
"""
|
|
1751
1777
|
Matches valid urls.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: vtjson
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.6
|
|
4
4
|
Summary: An easy to use validation library compatible with Python type annotations
|
|
5
5
|
Author-email: Michel Van den Bergh <michel.vandenbergh@uhasselt.be>
|
|
6
6
|
Project-URL: Homepage, https://github.com/vdbergh/vtjson
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
vtjson/__init__.py,sha256=oLX4JH6_R7dYtTiGfBG3pQGR21IArspifdmZilbuGOw,68
|
|
2
|
+
vtjson/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
vtjson/vtjson.py,sha256=yUD2ojGUUlDZ-KVF5Tzhle6VRoMZx8HVODhWMFFJrZc,87751
|
|
4
|
+
vtjson-2.2.6.dist-info/licenses/AUTHORS,sha256=qmxaXxaIO-YPNHJAZ0dcCrnPCs1x9ocbtMksiy4i80M,21
|
|
5
|
+
vtjson-2.2.6.dist-info/licenses/LICENSE,sha256=n7xW-zX8xBLHzCdqWIMRuMzBD_ACLcNCwio0LEkKt1o,1077
|
|
6
|
+
vtjson-2.2.6.dist-info/METADATA,sha256=yHpR0TUruUh51sZEtYuCveijFPlTtB-ju2WfYYRXR-g,3980
|
|
7
|
+
vtjson-2.2.6.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
+
vtjson-2.2.6.dist-info/top_level.txt,sha256=9DlSF3l63igcvnYPcj117F2hzOW4Nx0N-JBoW3jjBZM,7
|
|
9
|
+
vtjson-2.2.6.dist-info/RECORD,,
|
vtjson-2.2.5.dist-info/RECORD
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
vtjson/__init__.py,sha256=oLX4JH6_R7dYtTiGfBG3pQGR21IArspifdmZilbuGOw,68
|
|
2
|
-
vtjson/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
vtjson/vtjson.py,sha256=AQIoyST4Qfpc6apLbIg4plWEh-z0VlvbAjr03JVr924,87109
|
|
4
|
-
vtjson-2.2.5.dist-info/licenses/AUTHORS,sha256=qmxaXxaIO-YPNHJAZ0dcCrnPCs1x9ocbtMksiy4i80M,21
|
|
5
|
-
vtjson-2.2.5.dist-info/licenses/LICENSE,sha256=n7xW-zX8xBLHzCdqWIMRuMzBD_ACLcNCwio0LEkKt1o,1077
|
|
6
|
-
vtjson-2.2.5.dist-info/METADATA,sha256=4TSessIW50S0gojL08Xhj8k6kze022XbfQrMrIIWUE0,3980
|
|
7
|
-
vtjson-2.2.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
8
|
-
vtjson-2.2.5.dist-info/top_level.txt,sha256=9DlSF3l63igcvnYPcj117F2hzOW4Nx0N-JBoW3jjBZM,7
|
|
9
|
-
vtjson-2.2.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|