ramifice 0.3.15__py3-none-any.whl → 0.3.16__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.
- ramifice/add_valid.py +1 -1
- ramifice/decorators.py +24 -1
- ramifice/model.py +1 -1
- {ramifice-0.3.15.dist-info → ramifice-0.3.16.dist-info}/METADATA +3 -3
- {ramifice-0.3.15.dist-info → ramifice-0.3.16.dist-info}/RECORD +7 -7
- {ramifice-0.3.15.dist-info → ramifice-0.3.16.dist-info}/WHEEL +0 -0
- {ramifice-0.3.15.dist-info → ramifice-0.3.16.dist-info}/licenses/LICENSE +0 -0
ramifice/add_valid.py
CHANGED
@@ -7,6 +7,6 @@ class AddValidMixin(metaclass=ABCMeta):
|
|
7
7
|
"""Additional validation of fields."""
|
8
8
|
|
9
9
|
async def add_validation(self) -> dict[str, str]:
|
10
|
-
"""
|
10
|
+
"""Additional validation of fields."""
|
11
11
|
error_map: dict[str, str] = {}
|
12
12
|
return error_map
|
ramifice/decorators.py
CHANGED
@@ -26,6 +26,20 @@ def model(
|
|
26
26
|
is_delete_doc: bool = True,
|
27
27
|
) -> Any:
|
28
28
|
"""Decorator for converting into a Model."""
|
29
|
+
if not isinstance(service_name, str):
|
30
|
+
raise AssertionError("Parameter `service_name` - Must be `str` type!")
|
31
|
+
if not isinstance(fixture_name, (str, type(None))):
|
32
|
+
raise AssertionError("Parameter `fixture_name` - Must be `str | None` type!")
|
33
|
+
if not isinstance(db_query_docs_limit, int):
|
34
|
+
raise AssertionError("Parameter `db_query_docs_limit` - Must be `int` type!")
|
35
|
+
if not isinstance(is_migrate_model, bool):
|
36
|
+
raise AssertionError("Parameter `is_migrate_model` - Must be `bool` type!")
|
37
|
+
if not isinstance(is_create_doc, bool):
|
38
|
+
raise AssertionError("Parameter `is_create_doc` - Must be `bool` type!")
|
39
|
+
if not isinstance(is_update_doc, bool):
|
40
|
+
raise AssertionError("Parameter `is_update_doc` - Must be `bool` type!")
|
41
|
+
if not isinstance(is_delete_doc, bool):
|
42
|
+
raise AssertionError("Parameter `is_delete_doc` - Must be `bool` type!")
|
29
43
|
|
30
44
|
def decorator(cls: Any) -> Any:
|
31
45
|
if REGEX["service_name"].match(service_name) is None:
|
@@ -67,7 +81,16 @@ def model(
|
|
67
81
|
attrs,
|
68
82
|
)
|
69
83
|
else:
|
70
|
-
return type(
|
84
|
+
return type(
|
85
|
+
cls.__name__,
|
86
|
+
(
|
87
|
+
Model,
|
88
|
+
ValidationMixin,
|
89
|
+
CheckMixin,
|
90
|
+
AddValidMixin,
|
91
|
+
),
|
92
|
+
attrs,
|
93
|
+
)
|
71
94
|
|
72
95
|
return decorator
|
73
96
|
|
ramifice/model.py
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ramifice
|
3
|
-
Version: 0.3.
|
3
|
+
Version: 0.3.16
|
4
4
|
Summary: ORM-like API MongoDB for Python language.
|
5
5
|
Project-URL: Homepage, https://github.com/kebasyaty/ramifice
|
6
6
|
Project-URL: Documentation, https://kebasyaty.github.io/ramifice/
|
@@ -181,7 +181,7 @@ class User:
|
|
181
181
|
)
|
182
182
|
|
183
183
|
async def add_validation(self) -> dict[str, str]:
|
184
|
-
"""
|
184
|
+
"""Additional validation of fields."""
|
185
185
|
error_map: dict[str, str] = {}
|
186
186
|
if self.password != self.сonfirm_password:
|
187
187
|
error_map["password"] = "Passwords do not match!"
|
@@ -493,7 +493,7 @@ await user.delete(remove_files=False)
|
|
493
493
|
# Verification, replacement and recoverang of password.
|
494
494
|
user = User()
|
495
495
|
await user.verify_password(password="12345678")
|
496
|
-
await user.update_password(
|
496
|
+
await user.update_password( # uses verify_password
|
497
497
|
old_password="12345678",
|
498
498
|
new_password="O2eA4GIr38KGGlS",
|
499
499
|
)
|
@@ -1,13 +1,13 @@
|
|
1
1
|
ramifice/__init__.py,sha256=ISlaL2BprlJLE_N1fvtAqGrB3Dhniy9IZGoyWEYZhRU,678
|
2
|
-
ramifice/add_valid.py,sha256=
|
3
|
-
ramifice/decorators.py,sha256=
|
2
|
+
ramifice/add_valid.py,sha256=kvpMg7snL9tor0A23XRdgwiXazRwHfb8baoJUNjM_4Y,327
|
3
|
+
ramifice/decorators.py,sha256=hTivOrCbTqnnbbbicgoET3bLSICSjMzqctLKzf2YseM,6144
|
4
4
|
ramifice/errors.py,sha256=iuhq7fzpUmsOyeXeg2fJjta8yAuqlXLKsZVMpfUhtHE,1901
|
5
5
|
ramifice/fixtures.py,sha256=NtxOnZslYJb4yvRpZbs3ckugmTwHQFS_9iCt2zddOC0,3102
|
6
6
|
ramifice/hooks.py,sha256=Ri-ISfMT-IHaLO2eAqg8CODCTs3HRTxSylqspUKnVf4,873
|
7
7
|
ramifice/indexing.py,sha256=wQpX2qei5Zc7iIq5yIV93Skp8Aa8ZD0vybnEk7cRuXs,271
|
8
8
|
ramifice/migration.py,sha256=lksHC2f_19pDHp6Sg9pdwqA14jKxMsS8T7gfBdzIsDw,10932
|
9
9
|
ramifice/mixins.py,sha256=gKLmWQ-QrGO3K5_k-h1tDa08lkCql_dte2Jy05q1wsM,1125
|
10
|
-
ramifice/model.py,sha256=
|
10
|
+
ramifice/model.py,sha256=eJCrwURQuZApY84IpxvecS6dHTvT4MK3BpGFTEWz-H4,6536
|
11
11
|
ramifice/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
12
12
|
ramifice/store.py,sha256=Kqd2Zw7Wj2vnn_0eE6KmIOkWJRhDc6AZ0ZyqxENBetQ,2730
|
13
13
|
ramifice/translations.py,sha256=GNGE0ULAA0aOY5pTxUd3MQW-nVaKvp6BeXWEcsR0s0o,4048
|
@@ -75,7 +75,7 @@ ramifice/paladins/groups/num_group.py,sha256=Jvb-lwHxapQybbLerC4t-_yO8N7Coo1fIlZ
|
|
75
75
|
ramifice/paladins/groups/pass_group.py,sha256=SEKpR2voNQtmywugDXJKY4XqPTL91CrJ87h0QNMqQqs,1952
|
76
76
|
ramifice/paladins/groups/slug_group.py,sha256=_IRil2PwpY7cH7WaExNksKz61kQjvc27blrEufgUB30,2323
|
77
77
|
ramifice/paladins/groups/text_group.py,sha256=nYZGwAIsJD-tX8RBtFlWvngO9RU4V0CnREUhxvV2UDo,3493
|
78
|
-
ramifice-0.3.
|
79
|
-
ramifice-0.3.
|
80
|
-
ramifice-0.3.
|
81
|
-
ramifice-0.3.
|
78
|
+
ramifice-0.3.16.dist-info/METADATA,sha256=e2_MkRAQOyshI5iKiXLLcjPQA2UfLmZ5LCJ4jJHEC7I,18896
|
79
|
+
ramifice-0.3.16.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
80
|
+
ramifice-0.3.16.dist-info/licenses/LICENSE,sha256=LrEL0aTZx90HDwFUQCJutORiDjJL9AnuVvCtspXIqt4,1095
|
81
|
+
ramifice-0.3.16.dist-info/RECORD,,
|
File without changes
|
File without changes
|