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 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
- """For additional validation of fields."""
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(cls.__name__, (Model, ValidationMixin, CheckMixin, AddValidMixin), attrs)
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
@@ -48,7 +48,7 @@ class Model(metaclass=ABCMeta):
48
48
 
49
49
  @abstractmethod
50
50
  def fields(self) -> None:
51
- """For add fields."""
51
+ """For adding fields."""
52
52
  pass
53
53
 
54
54
  def model_name(self) -> str:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ramifice
3
- Version: 0.3.15
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
- """For additional validation of fields."""
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=nXIB9SSNtc3a6amCRM4k7P03zrcTKRz9kf-3MrdjZ-A,331
3
- ramifice/decorators.py,sha256=SThYdnYwaxAgEZsJnR7M7C2XCmuDkXwA9gvR9umb2Rk,5055
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=7AWVvXdP2wBY2ffx1Kx_8Ao-8VD5WGo1eOEKkFrAP68,6533
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.15.dist-info/METADATA,sha256=JtyHFCf2oOu3Vbax_MgUcIRKnEKs768hiYrS9XSM6-Q,18876
79
- ramifice-0.3.15.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
80
- ramifice-0.3.15.dist-info/licenses/LICENSE,sha256=LrEL0aTZx90HDwFUQCJutORiDjJL9AnuVvCtspXIqt4,1095
81
- ramifice-0.3.15.dist-info/RECORD,,
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,,