explicit-python 2.5.0__py3-none-any.whl → 3.1.0__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.
- explicit/adapters/db.py +8 -5
- explicit/adapters/fs.py +4 -2
- explicit/adapters/messaging.py +5 -3
- explicit/contrib/domain/model/__init__.py +5 -2
- explicit/contrib/domain/model/fields.py +11 -10
- explicit/contrib/messagebus/event_registry.py +19 -13
- explicit/domain/__init__.py +48 -22
- explicit/domain/factories.py +8 -8
- explicit/domain/fields.py +62 -4
- explicit/domain/model.py +66 -58
- explicit/domain/types.py +17 -13
- explicit/domain/validation/exceptions.py +31 -20
- explicit/messagebus/__init__.py +3 -1
- explicit/messagebus/commands.py +24 -34
- explicit/messagebus/dependency_injection.py +13 -13
- explicit/messagebus/events.py +47 -47
- explicit/messagebus/exceptions.py +3 -1
- explicit/messagebus/messagebus.py +24 -15
- explicit/messagebus/queries.py +15 -16
- explicit/unit_of_work.py +15 -25
- {explicit_python-2.5.0.dist-info → explicit_python-3.1.0.dist-info}/METADATA +10 -9
- explicit_python-3.1.0.dist-info/RECORD +31 -0
- explicit_python-2.5.0.dist-info/RECORD +0 -31
- {explicit_python-2.5.0.dist-info → explicit_python-3.1.0.dist-info}/WHEEL +0 -0
- {explicit_python-2.5.0.dist-info → explicit_python-3.1.0.dist-info}/licenses/LICENSE +0 -0
- {explicit_python-2.5.0.dist-info → explicit_python-3.1.0.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: explicit-python
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.1.0
|
|
4
4
|
Summary: Набор компонентов для построения многослойной архитектуры
|
|
5
5
|
Author-email: BARS Group <bars@bars-open.ru>
|
|
6
6
|
Project-URL: Homepage, https://stash.bars-open.ru/projects/EDUBASE/repos/explicit/browse
|
|
@@ -13,16 +13,17 @@ Classifier: Operating System :: OS Independent
|
|
|
13
13
|
Classifier: License :: OSI Approved :: MIT License
|
|
14
14
|
Classifier: Development Status :: 5 - Production/Stable
|
|
15
15
|
Classifier: Programming Language :: Python
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
17
16
|
Classifier: Programming Language :: Python :: 3.10
|
|
18
17
|
Classifier: Programming Language :: Python :: 3.11
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.12
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
-
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
22
|
+
Requires-Python: >=3.10
|
|
22
23
|
Description-Content-Type: text/markdown
|
|
23
24
|
License-File: LICENSE
|
|
24
25
|
Requires-Dist: more_itertools
|
|
25
|
-
Requires-Dist: pydantic<2.
|
|
26
|
+
Requires-Dist: pydantic<3,>=2.14
|
|
26
27
|
Dynamic: license-file
|
|
27
28
|
|
|
28
29
|
# Explicit
|
|
@@ -176,7 +177,7 @@ def update_person(person, data: 'PersonDTO'):
|
|
|
176
177
|
```python
|
|
177
178
|
class CommandBusMixin(ABC):
|
|
178
179
|
|
|
179
|
-
_command_handlers:
|
|
180
|
+
_command_handlers: dict[type[Command], Callable] = {}
|
|
180
181
|
|
|
181
182
|
def handle_command(self, command: Command):
|
|
182
183
|
"""Передача запроса обработчику типа данного запроса."""
|
|
@@ -191,10 +192,10 @@ def update_person(person, data: 'PersonDTO'):
|
|
|
191
192
|
) -> 'Student':
|
|
192
193
|
with uow.wrap():
|
|
193
194
|
student: Student = domain_register_student(
|
|
194
|
-
StudentDTO(**command.
|
|
195
|
+
StudentDTO(**command.model_dump())
|
|
195
196
|
)
|
|
196
197
|
uow.add_event(events.StudentCreated(
|
|
197
|
-
**command.
|
|
198
|
+
**command.model_dump(), **asdict(student)
|
|
198
199
|
))
|
|
199
200
|
return student
|
|
200
201
|
```
|
|
@@ -206,7 +207,7 @@ def update_person(person, data: 'PersonDTO'):
|
|
|
206
207
|
```python
|
|
207
208
|
class EventBusMixin(ABC):
|
|
208
209
|
|
|
209
|
-
_event_handlers:
|
|
210
|
+
_event_handlers: dict[type[Event], list[EventHandler]] = {}
|
|
210
211
|
|
|
211
212
|
def handle_event(self, event: Event):
|
|
212
213
|
"""Передача события списку обработчиков типа данного события."""
|
|
@@ -275,7 +276,7 @@ def update_person(person, data: 'PersonDTO'):
|
|
|
275
276
|
uow.students.update(student)
|
|
276
277
|
|
|
277
278
|
uow.add_event(events.StudentCreated(
|
|
278
|
-
**command.
|
|
279
|
+
**command.model_dump(), **asdict(student)
|
|
279
280
|
))
|
|
280
281
|
```
|
|
281
282
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
explicit/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
explicit/unit_of_work.py,sha256=e0j-8VvSxUv6yuo23eswJq8YUFCtSg_wokhAUg3vw4U,5289
|
|
3
|
+
explicit/adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
+
explicit/adapters/db.py,sha256=99qfUtLuJAPGCD4jI5mHXe8JXvTMsGZFVOcwlgueSRE,2369
|
|
5
|
+
explicit/adapters/fs.py,sha256=iJCC0E13McoISOsCEPsQ0bvuF_j1RpNXk5Imwfhig0M,958
|
|
6
|
+
explicit/adapters/messaging.py,sha256=jbNvoEkBDWXJxIQUOLw9OfHz9P1Qio5wysVGBjAm5Ro,365
|
|
7
|
+
explicit/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
+
explicit/contrib/domain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
+
explicit/contrib/domain/model/__init__.py,sha256=Vx0Sw_2P0u-qprCjGvlqYg3vA6JwfcrjhcXPGiN06oc,205
|
|
10
|
+
explicit/contrib/domain/model/fields.py,sha256=qrJ3E3IJAAjRnQN8tG7rEcD9UHQ2zHx8TV5J0N5Ufc4,931
|
|
11
|
+
explicit/contrib/messagebus/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
|
+
explicit/contrib/messagebus/event_registry.py,sha256=ZF0q33bJfllkPT0Z0GoP_tdC5niZaoQQKsy3xOWg2yI,1593
|
|
13
|
+
explicit/domain/__init__.py,sha256=0AbY_mASUjavRPCIZAOnf87UOz6V0c_VvwS2zDQXBOw,794
|
|
14
|
+
explicit/domain/factories.py,sha256=T2yXg3FV3XHV4n1QYEI7pXfjAjWbb0P7LqG5k22qqPc,961
|
|
15
|
+
explicit/domain/fields.py,sha256=Mb01LVfBicqLc14mgG2mVxh5gOk4pzi8THQabN2Aqcw,2022
|
|
16
|
+
explicit/domain/model.py,sha256=nxsxCcFhKRLqxqDRNaAoBw66cbMVWYX_QnTj0YouBVI,4532
|
|
17
|
+
explicit/domain/types.py,sha256=75C-eUfEwpx-G0uqO8aIOq2yKyLn5oanAhqMc2SY2a8,928
|
|
18
|
+
explicit/domain/validation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
|
+
explicit/domain/validation/exceptions.py,sha256=lDbF_PRcZg5RAh69YiEtCpGuuNMEw2Izb-baoPTteAw,5593
|
|
20
|
+
explicit/messagebus/__init__.py,sha256=ozV8d0c9dCa9IFOmndQEbgMdXEXSTWdQxuzT8CWiPrU,135
|
|
21
|
+
explicit/messagebus/commands.py,sha256=vEtq2LelPfpIC6YOTeVQU3zzcSm_lsc8_BiEHUmBM7k,3019
|
|
22
|
+
explicit/messagebus/dependency_injection.py,sha256=WOk4Fe7DZIBgcDN3_65l4VSQlithOSLxP0YuCPXFCm0,2513
|
|
23
|
+
explicit/messagebus/events.py,sha256=4OgsiFceNGEIqo1KJnqzy0cWgc88jismplpd45CnmJQ,3244
|
|
24
|
+
explicit/messagebus/exceptions.py,sha256=avWn_ex665jJHu7Jj8EBjs79Tq2ZvY2rveZOA6aHB-s,375
|
|
25
|
+
explicit/messagebus/messagebus.py,sha256=9XhP256iL9XvmEazkEnr5l52uUEKW_rNFl81HpHrHrQ,3593
|
|
26
|
+
explicit/messagebus/queries.py,sha256=OpfJS4WNnFOYy1M-rIlkHT78Wkob5LDOjOZ9B3xCTt0,1567
|
|
27
|
+
explicit_python-3.1.0.dist-info/licenses/LICENSE,sha256=CCIO8Y288mm2F53WG2U6QkY7qS7lthANGujcVt6fRlo,3455
|
|
28
|
+
explicit_python-3.1.0.dist-info/METADATA,sha256=H-PpDA1y4VKr0YFr9rEgYnJ-jK7_ojj8qVh8RwgJ3do,14580
|
|
29
|
+
explicit_python-3.1.0.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
|
30
|
+
explicit_python-3.1.0.dist-info/top_level.txt,sha256=tt6T8l4Yji4ww87qZQcD4CbcwTIHy7NAPmU7QAfMcpY,9
|
|
31
|
+
explicit_python-3.1.0.dist-info/RECORD,,
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
explicit/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
explicit/unit_of_work.py,sha256=dqFYlttzHof4ueJpuy_rArkfOKBgX9sZpaVmqqEi-kY,5439
|
|
3
|
-
explicit/adapters/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
4
|
-
explicit/adapters/db.py,sha256=DJ21cvBCR4VNG6ipC7HKPrz5ej_hLnofWb3nRj6xF38,2363
|
|
5
|
-
explicit/adapters/fs.py,sha256=jEVHe4YxNvSZZWUOFpfZu-TtGb9bWIUhNmXeScFfVak,949
|
|
6
|
-
explicit/adapters/messaging.py,sha256=EKAFTrZ1jDJ4ugAm3r2Xdo_PjP8XPriI5OCBdkwqguA,367
|
|
7
|
-
explicit/contrib/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
|
-
explicit/contrib/domain/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
|
-
explicit/contrib/domain/model/__init__.py,sha256=vbUym41oxPQD8yUMqK2XoYJBOb2w4KxHsse5nT1bQ1s,210
|
|
10
|
-
explicit/contrib/domain/model/fields.py,sha256=4mTjyQOIGc8eLEmECWJdwmr1DR0Pmdb01_ryCnRoBGE,970
|
|
11
|
-
explicit/contrib/messagebus/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
12
|
-
explicit/contrib/messagebus/event_registry.py,sha256=XNZEzlCw95fvPmvqCDrkAoelNsZ-J4-jNGTxtHIWoJ8,1630
|
|
13
|
-
explicit/domain/__init__.py,sha256=1m5sbbZWz7leJfWVLiSV5C8et3RpvjpMLxlSaEIA_wI,858
|
|
14
|
-
explicit/domain/factories.py,sha256=c2nPIJ57OEPWGYQ91Q5qt_HJdCYQWZlSxjCR_0DOnIg,1014
|
|
15
|
-
explicit/domain/fields.py,sha256=goSehIKqAfyu0tBejoMtZl2OE8Lajba8B2HJ5zvSYOs,229
|
|
16
|
-
explicit/domain/model.py,sha256=MCc38W43KfwzkM5idANhHYhWNRvWjyswphqlnTc2zo0,3919
|
|
17
|
-
explicit/domain/types.py,sha256=CTC-CV4aRXQvJ1hy0LOAOtkDnJA7MTTMEw6UHBFKGL0,994
|
|
18
|
-
explicit/domain/validation/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
|
-
explicit/domain/validation/exceptions.py,sha256=qHmLuFnsrweNDXGTkG2baPmMYcjkDdgQefANrq1xwx8,5055
|
|
20
|
-
explicit/messagebus/__init__.py,sha256=u5D-bx-IqhG1LFv-78RGK9Tgbv-uPQL_bQgDr586GsM,126
|
|
21
|
-
explicit/messagebus/commands.py,sha256=418gVurePuNbzZyE91wtitmhwgWMKRo--r6qL-HHiO4,3176
|
|
22
|
-
explicit/messagebus/dependency_injection.py,sha256=wOYcixyW-8bn4Bd0IZfdahPWUkF8UACG0wm3PN9S95o,2578
|
|
23
|
-
explicit/messagebus/events.py,sha256=BKAqEqIC_V6sYMeHZQpAZBsigf9NanSgGZVTJlKX3-I,3487
|
|
24
|
-
explicit/messagebus/exceptions.py,sha256=rDQur7hAx2QyAGRgcQ_J0wN7GUIeZ1l9TvGHy9HVQr0,366
|
|
25
|
-
explicit/messagebus/messagebus.py,sha256=1ef5zvZYKOCZRkS2xQX_1UDrR5SgIZvy5euNAZNhEuE,3652
|
|
26
|
-
explicit/messagebus/queries.py,sha256=kMtT8Bm2YeZbrORAIqq0unou1V2XBz8hvLPXmmzHP_4,1616
|
|
27
|
-
explicit_python-2.5.0.dist-info/licenses/LICENSE,sha256=CCIO8Y288mm2F53WG2U6QkY7qS7lthANGujcVt6fRlo,3455
|
|
28
|
-
explicit_python-2.5.0.dist-info/METADATA,sha256=iwP68xyTJOAE27qWbpkFDv08o1v8Pusnb2qyApJidhg,14504
|
|
29
|
-
explicit_python-2.5.0.dist-info/WHEEL,sha256=1tXe9gY0PYatrMPMDd6jXqjfpz_B-Wqm32CPfRC58XU,91
|
|
30
|
-
explicit_python-2.5.0.dist-info/top_level.txt,sha256=tt6T8l4Yji4ww87qZQcD4CbcwTIHy7NAPmU7QAfMcpY,9
|
|
31
|
-
explicit_python-2.5.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|