arpakitlib 1.8.197__py3-none-any.whl → 1.8.199__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.
- arpakitlib/_arpakit_project_template_v_5/arpakitlib_project_template_info.json +1 -1
- arpakitlib/_arpakit_project_template_v_5/project/sqlalchemy_db_/sqlalchemy_model/common.py +22 -0
- {arpakitlib-1.8.197.dist-info → arpakitlib-1.8.199.dist-info}/METADATA +1 -1
- {arpakitlib-1.8.197.dist-info → arpakitlib-1.8.199.dist-info}/RECORD +7 -7
- {arpakitlib-1.8.197.dist-info → arpakitlib-1.8.199.dist-info}/LICENSE +0 -0
- {arpakitlib-1.8.197.dist-info → arpakitlib-1.8.199.dist-info}/WHEEL +0 -0
- {arpakitlib-1.8.197.dist-info → arpakitlib-1.8.199.dist-info}/entry_points.txt +0 -0
@@ -26,6 +26,16 @@ def make_slug_from_string(string: str) -> str:
|
|
26
26
|
return string
|
27
27
|
|
28
28
|
|
29
|
+
def _make_word_to_plural(word: str):
|
30
|
+
if word.endswith(("s", "x", "z", "ch", "sh")):
|
31
|
+
return word + "es"
|
32
|
+
|
33
|
+
if len(word) > 1 and word[-1] == "y" and word[-2].lower() not in "aeiou":
|
34
|
+
return word[:-1] + "ies"
|
35
|
+
|
36
|
+
return word + "s"
|
37
|
+
|
38
|
+
|
29
39
|
class SimpleDBM(BaseDBM):
|
30
40
|
__abstract__ = True
|
31
41
|
|
@@ -113,10 +123,22 @@ class SimpleDBM(BaseDBM):
|
|
113
123
|
def id_and_long_id(self) -> str:
|
114
124
|
return f"{self.id}--{self.long_id}"
|
115
125
|
|
126
|
+
@classmethod
|
127
|
+
def get_cls_entity_name(cls) -> str:
|
128
|
+
return cls.__name__.removesuffix("DBM")
|
129
|
+
|
130
|
+
@classmethod
|
131
|
+
def get_cls_entity_name_plural(cls):
|
132
|
+
return _make_word_to_plural(word=cls.get_cls_entity_name())
|
133
|
+
|
116
134
|
@property
|
117
135
|
def entity_name(self) -> str:
|
118
136
|
return self.__class__.__name__.removesuffix("DBM")
|
119
137
|
|
138
|
+
@property
|
139
|
+
def entity_name_plural(self) -> str:
|
140
|
+
return _make_word_to_plural(word=self.entity_name)
|
141
|
+
|
120
142
|
@property
|
121
143
|
def uuid_as_str(self) -> str:
|
122
144
|
return str(self.uuid)
|
@@ -8,7 +8,7 @@ arpakitlib/_arpakit_project_template_v_5/alembic/env.py,sha256=Qesmnj5A2kB-Doeuf
|
|
8
8
|
arpakitlib/_arpakit_project_template_v_5/alembic/script.py.mako,sha256=MEqL-2qATlST9TAOeYgscMn1uy6HUS9NFvDgl93dMj8,635
|
9
9
|
arpakitlib/_arpakit_project_template_v_5/alembic/versions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
10
10
|
arpakitlib/_arpakit_project_template_v_5/alembic.ini,sha256=8fuyeEvGBiPGbxEFy8ISBV3xX_fgVmuhEGpB10_B5Uo,3733
|
11
|
-
arpakitlib/_arpakit_project_template_v_5/arpakitlib_project_template_info.json,sha256=
|
11
|
+
arpakitlib/_arpakit_project_template_v_5/arpakitlib_project_template_info.json,sha256=MBIsej1Zz35LiImnteBxQ8VLPP6EOXw-YL0asSTrzTc,98
|
12
12
|
arpakitlib/_arpakit_project_template_v_5/command/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
13
13
|
arpakitlib/_arpakit_project_template_v_5/command/alembic_history.sh,sha256=OMnDNtHIksGh9iavWnzbtxcudZW4vjdcISsBXvzZSPw,22
|
14
14
|
arpakitlib/_arpakit_project_template_v_5/command/alembic_revision_autogenerate.sh,sha256=yW2i-SBOtBx15Ya0poVQqKkJM5t2JZp06r9AEW-DmGE,46
|
@@ -262,7 +262,7 @@ arpakitlib/_arpakit_project_template_v_5/project/sqlalchemy_db_/const.py,sha256=
|
|
262
262
|
arpakitlib/_arpakit_project_template_v_5/project/sqlalchemy_db_/sqlalchemy_db.py,sha256=1y3FaMFzm_5UM2poqtBve_UP_mh1vjs--krq6yO8PsA,742
|
263
263
|
arpakitlib/_arpakit_project_template_v_5/project/sqlalchemy_db_/sqlalchemy_model/__init__.py,sha256=7PQqeYThEBXRrXwJZjuH7yAFu25DVr_IneuMwEF3kUE,731
|
264
264
|
arpakitlib/_arpakit_project_template_v_5/project/sqlalchemy_db_/sqlalchemy_model/api_key.py,sha256=2X6VPkf1TKq-0319J0tL-rPMvgmkBCjim3Si1dZboMQ,1969
|
265
|
-
arpakitlib/_arpakit_project_template_v_5/project/sqlalchemy_db_/sqlalchemy_model/common.py,sha256=
|
265
|
+
arpakitlib/_arpakit_project_template_v_5/project/sqlalchemy_db_/sqlalchemy_model/common.py,sha256=OuHmYkFUPnSQ5QV8UiAjBax5GLNGGGh1zOYSjKp3nqw,4598
|
266
266
|
arpakitlib/_arpakit_project_template_v_5/project/sqlalchemy_db_/sqlalchemy_model/operation.py,sha256=emIo83GUEoywgh4fGv2xDGIkCtSUPq_2ujRlLEc5woM,5930
|
267
267
|
arpakitlib/_arpakit_project_template_v_5/project/sqlalchemy_db_/sqlalchemy_model/story_log.py,sha256=CiNec-x5_z0Pr5Mt-RZXJ1tKJMRn_TAKIaOioG4NK7U,2489
|
268
268
|
arpakitlib/_arpakit_project_template_v_5/project/sqlalchemy_db_/sqlalchemy_model/user.py,sha256=22TE8y2Vm9byLLkIE6RVAMa29d9ILCVg1e1QYi4ONIQ,7898
|
@@ -413,8 +413,8 @@ arpakitlib/ar_sqlalchemy_util.py,sha256=hiDh1GrFHmnqa6lJPMq4fb9m3_fs-eDKuRQzbFxI
|
|
413
413
|
arpakitlib/ar_str_util.py,sha256=2lGpnXDf2h1cBZpVf5i1tX_HCv5iBd6IGnrCw4QWWlY,4350
|
414
414
|
arpakitlib/ar_type_util.py,sha256=Cs_tef-Fc5xeyAF54KgISCsP11NHyzIsglm4S3Xx7iM,4049
|
415
415
|
arpakitlib/ar_yookassa_api_client_util.py,sha256=VozuZeCJjmLd1zj2BdC9WfiAQ3XYOrIMsdpNK-AUlm0,5347
|
416
|
-
arpakitlib-1.8.
|
417
|
-
arpakitlib-1.8.
|
418
|
-
arpakitlib-1.8.
|
419
|
-
arpakitlib-1.8.
|
420
|
-
arpakitlib-1.8.
|
416
|
+
arpakitlib-1.8.199.dist-info/LICENSE,sha256=GPEDQMam2r7FSTYqM1mm7aKnxLaWcBotH7UvQtea-ec,11355
|
417
|
+
arpakitlib-1.8.199.dist-info/METADATA,sha256=VAmw9Y3J0tKjISZxdwXsimwEXypbp0_Oy7poWe0ESvc,3741
|
418
|
+
arpakitlib-1.8.199.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
419
|
+
arpakitlib-1.8.199.dist-info/entry_points.txt,sha256=36xqR3PJFT2kuwjkM_EqoIy0qFUDPKSm_mJaI7emewE,87
|
420
|
+
arpakitlib-1.8.199.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|