ramifice 0.8.41__py3-none-any.whl → 0.8.43__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/__init__.py CHANGED
@@ -35,7 +35,7 @@ __all__ = (
35
35
  import logging
36
36
 
37
37
  from xloft import NamedTuple
38
- from xloft.human import to_human_size
38
+ from xloft.converters import to_human_size
39
39
 
40
40
  from ramifice.models.decorator import model
41
41
  from ramifice.utils import translations
@@ -83,7 +83,7 @@ class GeneralMixin:
83
83
  comment: Any | None = None,
84
84
  **kwargs,
85
85
  ) -> AsyncCommandCursor:
86
- """Runs an aggregation framework pipeline."""
86
+ """Perform an aggregation using the aggregation framework on this collection."""
87
87
  # Get collection for current model.
88
88
  collection: AsyncCollection = constants.MONGO_DATABASE[cls.META["collection_name"]]
89
89
  # Correcting filter.
@@ -108,7 +108,7 @@ class GeneralMixin:
108
108
  hint: Any | None = None,
109
109
  **kwargs,
110
110
  ) -> list[Any]:
111
- """Finds the distinct values for a specified field across a single collection.
111
+ """Get a list of distinct values for key among all documents in this collection.
112
112
 
113
113
  Returns an array of unique values for specified field of collection.
114
114
  """
@@ -129,7 +129,7 @@ class GeneralMixin:
129
129
 
130
130
  @classmethod
131
131
  def collection_name(cls) -> str:
132
- """Get collection name."""
132
+ """The name of this AsyncCollection."""
133
133
  # Get collection for current model.
134
134
  collection: AsyncCollection = constants.MONGO_DATABASE[cls.META["collection_name"]]
135
135
  #
ramifice/commons/many.py CHANGED
@@ -240,7 +240,7 @@ class ManyMixin:
240
240
  let: Any | None = None,
241
241
  comment: Any | None = None,
242
242
  ) -> DeleteResult:
243
- """Find documents and delete."""
243
+ """Delete one or more documents matching the filter."""
244
244
  # Raises a panic if the Model cannot be removed.
245
245
  if not cls.META["is_delete_doc"]:
246
246
  msg = (
ramifice/commons/one.py CHANGED
@@ -31,7 +31,7 @@ class OneMixin:
31
31
  *args: tuple,
32
32
  **kwargs: dict[str, Any],
33
33
  ) -> dict[str, Any] | None:
34
- """Find a single document."""
34
+ """Get a single document from the database."""
35
35
  # Get collection for current model.
36
36
  collection: AsyncCollection = constants.MONGO_DATABASE[cls.META["collection_name"]]
37
37
  # Correcting filter.
@@ -124,7 +124,7 @@ class OneMixin:
124
124
  let: Any | None = None,
125
125
  comment: Any | None = None,
126
126
  ) -> DeleteResult:
127
- """Find a single document and delete it."""
127
+ """Delete a single document matching the filter."""
128
128
  # Raises a panic if the Model cannot be removed.
129
129
  if not cls.META["is_delete_doc"]:
130
130
  msg = (
@@ -162,7 +162,7 @@ class OneMixin:
162
162
  comment: Any | None = None,
163
163
  **kwargs: dict[str, Any],
164
164
  ) -> dict[str, Any] | None:
165
- """Find a single document and delete it, return original."""
165
+ """Finds a single document and deletes it, returning the document."""
166
166
  # Raises a panic if the Model cannot be removed.
167
167
  if not cls.META["is_delete_doc"]:
168
168
  msg = (
@@ -9,7 +9,7 @@ __all__ = ("FileGroupMixin",)
9
9
 
10
10
  from typing import Any
11
11
 
12
- from xloft.human import to_human_size
12
+ from xloft.converters import to_human_size
13
13
 
14
14
  from ramifice.paladins.tools import (
15
15
  accumulate_error,
@@ -11,7 +11,7 @@ from asyncio import to_thread
11
11
  from typing import Any
12
12
 
13
13
  from PIL import Image
14
- from xloft.human import to_human_size
14
+ from xloft.converters import to_human_size
15
15
 
16
16
  from ramifice.paladins.tools import accumulate_error, panic_type_error
17
17
  from ramifice.utils import translations
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ramifice
3
- Version: 0.8.41
3
+ Version: 0.8.43
4
4
  Summary: ORM-pseudo-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/
@@ -1,10 +1,10 @@
1
- ramifice/__init__.py,sha256=Ms9drE4wSvoUyzAtAa-VRykD7ufz6L_GtHx-YQRePDI,1619
1
+ ramifice/__init__.py,sha256=E_FanqYNnI0nrzHGS7LxsmRSe18Ka4iyxrr3K2TC6s4,1624
2
2
  ramifice/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  ramifice/commons/__init__.py,sha256=RR_cVDF0H8xa56q2PXGKUSmYOPF-AUNKRY9u7DHD_KU,583
4
- ramifice/commons/general.py,sha256=J5W65pLWROrQl62odahg9pBlC5_yv4vu9FEn3_cPMVU,5438
4
+ ramifice/commons/general.py,sha256=yPRG8c2s5C7-J2L4Ev_pa0QA0TWdVrCoD15MuKU5DtY,5488
5
5
  ramifice/commons/indexes.py,sha256=Y8v1L3_upl771pJG7mQkSJNwP6slGEakVvj2fZ4zloE,3655
6
- ramifice/commons/many.py,sha256=6_3UYjWNbFsP5eaFrI7b7xe4o-iFp7V570pR_ELUaXo,9407
7
- ramifice/commons/one.py,sha256=hv3gj739YKF3UWtS2Q-TFqgAkZs2du0HxMuQ0LIArJc,6993
6
+ ramifice/commons/many.py,sha256=F1OxAuwmswHTFRUZAvRQO3w4Ih31E3W6FMts07w9OtI,9430
7
+ ramifice/commons/one.py,sha256=b-nIVDCCZhH58z3Fbqrz7r8cf8fEAvV9ZycSLLR2Gpk,7027
8
8
  ramifice/commons/tools.py,sha256=MCTPtOl14sIUBkp51f-nqTFVsD0iUj51G40rEFSzU20,2477
9
9
  ramifice/commons/unit_manager.py,sha256=V9i3O-Z3eZKVpMUv2a_8FV0VBeHpJZWqeLRGJmtAEsg,4983
10
10
  ramifice/fields/__init__.py,sha256=e1TlGRLYMo-97CNUona6EFR0svR--Wp77d_LsYhaBoo,2398
@@ -61,9 +61,9 @@ ramifice/paladins/groups/__init__.py,sha256=MmScWKa2cfEfowr2fUxH41VIVOkOpgz5ELTd
61
61
  ramifice/paladins/groups/bool_group.py,sha256=yHdjC1MknQCQ-PssQRkxhQObE7U6XjlBTk40sa54a3M,879
62
62
  ramifice/paladins/groups/choice_group.py,sha256=PRuxCkDrWtoCyEhCn-WTPjub7RfoWEdSHJRyza3Nsc8,1886
63
63
  ramifice/paladins/groups/date_group.py,sha256=Y2fFEX2elmE5QphDEOf-xhvmR6ryR34S9tSBpMspZY4,3846
64
- ramifice/paladins/groups/file_group.py,sha256=8TI0CozyLar-uEQX7STxmrm3fqYDieQMyquydbyx-I4,3025
64
+ ramifice/paladins/groups/file_group.py,sha256=BTZbep5OA5Dn31R4HHeQZx24TXTT6zwslArvfpxw_54,3030
65
65
  ramifice/paladins/groups/id_group.py,sha256=PnWfH1LkpduMxU9Qpm6XhC1zeKb_KQNgGAFSASQm9q0,1359
66
- ramifice/paladins/groups/img_group.py,sha256=CygCrv-hzzFzmvI2U-CnuluB70oGIs05QYFHjr_GO8g,6179
66
+ ramifice/paladins/groups/img_group.py,sha256=mQYHJQ8IuYAnguMUfPyLnxyKm_ow3qUgsKCNP-qxD88,6184
67
67
  ramifice/paladins/groups/num_group.py,sha256=-dQeE9IpeoLZ4hWw5YjeKdhPfV8U_TIwKAiFEjYzVzA,2401
68
68
  ramifice/paladins/groups/pass_group.py,sha256=jRU2tQGEJjFnOJnW1uKlgib-ffA2aVncgNjlCS_rxfM,1964
69
69
  ramifice/paladins/groups/slug_group.py,sha256=zq1C-4XvL7vnM12FhzXYgDhgAgydrU1PlG70pP0pQnA,2543
@@ -77,7 +77,7 @@ ramifice/utils/mixins.py,sha256=5G3x8hK3igM7JBgCiCnVDdb_0K_D1gV1tw0QKpDlm-A,1161
77
77
  ramifice/utils/tools.py,sha256=WOazw24pvL96-0yNBy7YRGErN3vAQ4F6GS9TLvWFqrs,2747
78
78
  ramifice/utils/translations.py,sha256=YItvCWv-13FS2x8VYsAOH-Nx_qQOitOX7-bRGX3mc3A,4718
79
79
  ramifice/utils/unit.py,sha256=zHfvkyEU4sxHOc-QMuntEcvyfQqH75AK1zx8E25kM9Y,2535
80
- ramifice-0.8.41.dist-info/METADATA,sha256=IJ24UD1ygLRIQLYC0_tTuXu4b4cBK__W27wttOYqFJY,18899
81
- ramifice-0.8.41.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
82
- ramifice-0.8.41.dist-info/licenses/LICENSE,sha256=LrEL0aTZx90HDwFUQCJutORiDjJL9AnuVvCtspXIqt4,1095
83
- ramifice-0.8.41.dist-info/RECORD,,
80
+ ramifice-0.8.43.dist-info/METADATA,sha256=Guw-rKPVol_ea-Ns3fGzE1i_hxbMAwpgXDiM01iRKjQ,18899
81
+ ramifice-0.8.43.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
82
+ ramifice-0.8.43.dist-info/licenses/LICENSE,sha256=LrEL0aTZx90HDwFUQCJutORiDjJL9AnuVvCtspXIqt4,1095
83
+ ramifice-0.8.43.dist-info/RECORD,,