python-ddd-framework 0.6.0__py3-none-any.whl → 0.7.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.
Files changed (90) hide show
  1. python_ddd_framework/authorization/checking.py +35 -0
  2. python_ddd_framework/developer_kit/generation.py +0 -9
  3. python_ddd_framework/developer_kit/templates/module/cookiecutter.json +1 -1
  4. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/README.md +29 -77
  5. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/module.py.jinja +5 -72
  6. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain/module.py.jinja +1 -3
  7. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/module.py.jinja +2 -3
  8. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/http_api/module.py.jinja +8 -62
  9. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/sqlalchemy/module.py.jinja +1 -2
  10. python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name}}/AGENTS.md +12 -8
  11. python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name}}/README.md +22 -10
  12. python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name}}/backend/src/host/main.py.jinja +4 -1
  13. python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name}}/docs/architecture.md +40 -6
  14. python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name}}/docs/development.md +177 -30
  15. python_ddd_framework/fastapi/__init__.py +2 -0
  16. python_ddd_framework/fastapi/access.py +127 -0
  17. python_ddd_framework/fastapi/access_options.py +13 -0
  18. python_ddd_framework/fastapi/action.py +6 -0
  19. python_ddd_framework/fastapi/manual_action.py +33 -2
  20. python_ddd_framework/fastapi/module.py +2 -0
  21. python_ddd_framework/fastapi/realtime/authentication.py +21 -10
  22. python_ddd_framework/fastapi/realtime/options.py +0 -1
  23. python_ddd_framework/fastapi/realtime/runtime.py +41 -26
  24. python_ddd_framework/fastapi/request_context.py +10 -2
  25. python_ddd_framework/fastapi/routing.py +12 -5
  26. python_ddd_framework/fastapi/server.py +9 -0
  27. python_ddd_framework/fastapi/service_endpoints.py +5 -0
  28. python_ddd_framework/fastapi/streaming.py +95 -0
  29. python_ddd_framework/fastapi/transfer.py +138 -3
  30. python_ddd_framework/invocation/dispatcher.py +2 -24
  31. python_ddd_framework/invocation/scopes.py +5 -3
  32. python_ddd_framework/observability/formatting.py +1 -0
  33. python_ddd_framework/unit_of_work/manager.py +11 -2
  34. {python_ddd_framework-0.6.0.dist-info → python_ddd_framework-0.7.0.dist-info}/METADATA +29 -8
  35. {python_ddd_framework-0.6.0.dist-info → python_ddd_framework-0.7.0.dist-info}/RECORD +39 -86
  36. {python_ddd_framework-0.6.0.dist-info → python_ddd_framework-0.7.0.dist-info}/WHEEL +1 -1
  37. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/background_jobs/order_approval/__init__.py.jinja +0 -1
  38. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/background_jobs/order_approval/handler.py.jinja +0 -45
  39. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/background_jobs/order_approval/payload.py.jinja +0 -8
  40. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/background_jobs/order_statistics/__init__.py.jinja +0 -1
  41. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/background_jobs/order_statistics/handler.py.jinja +0 -35
  42. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/background_jobs/order_statistics/payload.py.jinja +0 -5
  43. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/background_jobs/order_statistics/schedule.py.jinja +0 -15
  44. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/background_workers/order_maintenance_worker.py.jinja +0 -28
  45. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/background_workers/order_statistics_worker.py.jinja +0 -26
  46. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/caching/order_cache.py.jinja +0 -9
  47. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/caching/statistics_cache.py.jinja +0 -9
  48. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/event_handlers/order_changed_handler.py.jinja +0 -23
  49. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/hosted_services/order_integration_service.py.jinja +0 -71
  50. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/hosted_services/order_observation_handler.py.jinja +0 -16
  51. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/integration_services/order_reporting_service.py.jinja +0 -16
  52. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/interceptors/order_timing_interceptor.py.jinja +0 -17
  53. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/options/order_options.py.jinja +0 -7
  54. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/services/order_approval_service.py.jinja +0 -65
  55. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/services/order_management_service.py.jinja +0 -35
  56. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/services/order_query_service.py.jinja +0 -41
  57. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/setting_handlers/approval_setting_observer.py.jinja +0 -17
  58. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application_contracts/inputs/approve_order.py.jinja +0 -6
  59. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application_contracts/inputs/create_order.py.jinja +0 -7
  60. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application_contracts/integration_services/order_reporting_service.py.jinja +0 -7
  61. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application_contracts/services/order_approval_service.py.jinja +0 -13
  62. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application_contracts/services/order_management_service.py.jinja +0 -10
  63. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application_contracts/services/order_query_service.py.jinja +0 -12
  64. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application_contracts/views/order_statistics_snapshot.py.jinja +0 -9
  65. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application_contracts/views/order_view.py.jinja +0 -12
  66. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain/entities/order.py.jinja +0 -48
  67. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain/events/order_changed.py.jinja +0 -13
  68. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain/repositories/order_repository.py.jinja +0 -17
  69. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain/seeding/order_seed_contributor.py.jinja +0 -22
  70. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain/services/order_approval_service.py.jinja +0 -23
  71. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain/settings/approval_settings.py.jinja +0 -17
  72. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain/value_objects/order_title.py.jinja +0 -10
  73. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/constants/order_constants.py.jinja +0 -3
  74. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/enums/order_status.py.jinja +0 -6
  75. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/errors/order_errors.py.jinja +0 -11
  76. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/messages/order_messages.py.jinja +0 -26
  77. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/messages/order_observation.py.jinja +0 -13
  78. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/permissions/order_permission_provider.py.jinja +0 -19
  79. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/permissions/order_permissions.py.jinja +0 -7
  80. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/value_objects/money.py.jinja +0 -18
  81. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/http_api/filters/export_filter.py.jinja +0 -15
  82. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/http_api/models/refresh_orders.py.jinja +0 -5
  83. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/http_api/routers/order_files.py.jinja +0 -76
  84. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/http_api/websockets/order_socket.py.jinja +0 -44
  85. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/sqlalchemy/models/order_model.py.jinja +0 -29
  86. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/sqlalchemy/repositories/order_repository.py.jinja +0 -81
  87. python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/tests/test_domain.py.jinja +0 -19
  88. {python_ddd_framework-0.6.0.dist-info → python_ddd_framework-0.7.0.dist-info}/entry_points.txt +0 -0
  89. {python_ddd_framework-0.6.0.dist-info → python_ddd_framework-0.7.0.dist-info}/licenses/LICENSE +0 -0
  90. {python_ddd_framework-0.6.0.dist-info → python_ddd_framework-0.7.0.dist-info}/licenses/src/python_ddd_framework/background_jobs/pgqueuer/UPSTREAM_LICENSE.txt +0 -0
@@ -27,6 +27,7 @@ python_ddd_framework/auditing/sqlalchemy/module.py,sha256=KLS-Kz9mYcU4Kr1PAErWGw
27
27
  python_ddd_framework/auditing/sqlalchemy/store.py,sha256=1_hD_yIrLTiwioqGxVcyxqcVBXcOUTxrcD5R0zZwpWo,2280
28
28
  python_ddd_framework/authorization/__init__.py,sha256=vDkdpaIgdW0RR7TAF7c860VVc_TzTWRARvKEfi2qngo,1052
29
29
  python_ddd_framework/authorization/catalog.py,sha256=ul9iHLggH3uGXi3DwrzxVRqT9E_qXioQnarMpuhlcMc,2437
30
+ python_ddd_framework/authorization/checking.py,sha256=cMbTFHib6mnlYWcElgl-kKcNeAjz0Qv9B8K88KZsAfA,1402
30
31
  python_ddd_framework/authorization/contracts.py,sha256=H8oYlZwlERkRa4VXp_EkX81vhIztZb8hvCm4PjIusUM,9380
31
32
  python_ddd_framework/authorization/definition_discovery.py,sha256=4NTEb4VGMuw573dmCOsWMxJWnhprl3YCJfTi6o0ZCVY,3337
32
33
  python_ddd_framework/authorization/definitions.py,sha256=efeU_GGhPremX6YYDI31CzTzywuZcch42pkMmwd3FAA,1682
@@ -93,7 +94,7 @@ python_ddd_framework/configuration/sources.py,sha256=Xd7Sxk0umHS7h5SRq08NSWGhLmJ
93
94
  python_ddd_framework/configuration/values.py,sha256=4S8Ae2CRRekA9ge0ZxoMJcdJn3XqnF06E6DOaAZZuHc,14591
94
95
  python_ddd_framework/configuration/yaml_source.py,sha256=hZhKftmip6rRQUwqQBfTi_d-UYthUqWPbL5dQUvb89Q,2016
95
96
  python_ddd_framework/developer_kit/__init__.py,sha256=PWBBMijgV-eaks044Q9KoSkGJ6Nr1BGvyDJpEKLUMsw,76
96
- python_ddd_framework/developer_kit/generation.py,sha256=GOvSBbsmFVr3GczS0lSOckIIiySzr4t9II2bCu3eurg,9842
97
+ python_ddd_framework/developer_kit/generation.py,sha256=rihu5Tumct705_dD_q6ZuSj4gJdC8MFZQEyP4pPQjnc,9413
97
98
  python_ddd_framework/developer_kit/project_metadata.py,sha256=_GMMdxSgVdJ6NHMdv9RKvRiokJMD2ok9it6p8LFY1G0,2011
98
99
  python_ddd_framework/developer_kit/publication.py,sha256=8sN4FeyQw7PJTuL7GnLyvEUtYU99XAjJQOi91IBrjQs,19024
99
100
  python_ddd_framework/developer_kit/source.py,sha256=KgAqGJS1MpLpOuvGR7C8ree8zE33FfeC6Zn12Svb6Lg,2062
@@ -105,111 +106,60 @@ python_ddd_framework/developer_kit/templates/basic/{{cookiecutter.module_name}}/
105
106
  python_ddd_framework/developer_kit/templates/basic/{{cookiecutter.module_name}}/module.py.jinja,sha256=6SfgAEQlwiGJYHAg9wQ2WJLOIbduwXVmL3qIcO8dL6M,1004
106
107
  python_ddd_framework/developer_kit/templates/basic/{{cookiecutter.module_name}}/services/__init__.py.jinja,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
107
108
  python_ddd_framework/developer_kit/templates/basic/{{cookiecutter.module_name}}/services/default_conversion_service.py.jinja,sha256=YIYXqDycBVoUlLCwwUZ2tcyUk2fKSu-20mI00u5QUhc,342
108
- python_ddd_framework/developer_kit/templates/module/cookiecutter.json,sha256=yirXpnODe6TAOyf2VR0LhAMPdrX-_Qvjobu4K0mC8ck,120
109
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/README.md,sha256=15Zzhk7kFmi1fv4RulXbJ_CdVHxbeMbOmN0QGfdvVzs,14906
109
+ python_ddd_framework/developer_kit/templates/module/cookiecutter.json,sha256=edD_zSqmFuOKvMZyxmFFabAavBQJk0tbGO4YrnsgZN0,60
110
+ python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/README.md,sha256=bojfHi_8PIPSeJheOdS6hSIaG2LrXDwmqymnwm0ZPDs,5674
110
111
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/__init__.py.jinja,sha256=byPOI4PKtQDi5IQa9tzZZEVYy5zGx9PJdBzPrgcxm64,89
111
112
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/__init__.py.jinja,sha256=pm9_TqjN20deRELpopxK412O3mra0OZ6QdesPdcsaRU,90
112
113
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/background_jobs/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
113
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/background_jobs/order_approval/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
114
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/background_jobs/order_approval/handler.py.jinja,sha256=6rSMbsLXX9gB8WpTnJJenJdL3hJ4E8QAK6RCsRYNMEw,2411
115
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/background_jobs/order_approval/payload.py.jinja,sha256=a3d-y9BZPKhxvSytOw2-Bq11CJ6kHygAcUD9DduB3z4,180
116
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/background_jobs/order_statistics/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
117
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/background_jobs/order_statistics/handler.py.jinja,sha256=5dSFkMycni0TTB5JvnwixcSGAzA-Q0_RdeAJug0h6N8,1494
118
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/background_jobs/order_statistics/payload.py.jinja,sha256=PdiJtzMYOi0nWtemkSA5T_TzYb0QrKS1MJaxTMLJ1sY,140
119
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/background_jobs/order_statistics/schedule.py.jinja,sha256=GllIbgUWgmLoEBbKTsN3Sf1KfvEW0vbWjV2ivc-iZJU,542
120
114
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/background_workers/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
121
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/background_workers/order_maintenance_worker.py.jinja,sha256=R-9ELZrL7vV3PRF6Bhvrfo5hzw6uJryxKfw1ZzFgfVw,1315
122
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/background_workers/order_statistics_worker.py.jinja,sha256=e55c_NxAmUof1cHXvLJrnpyHCCRCQRMKbbfXyLsxTa8,1106
123
115
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/caching/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
124
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/caching/order_cache.py.jinja,sha256=JSqqIY7PugJn0Lw40zhuoDRQHCLvsxEYb3arTW-IPcc,335
125
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/caching/statistics_cache.py.jinja,sha256=KsRq9Z29Tfa5sF342X-3zt9p8vLoNq8Ml55CVDxitfw,394
126
116
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/event_handlers/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
127
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/event_handlers/order_changed_handler.py.jinja,sha256=Tu40Q_HPbF0dNO0hqNJDBFCs6G2n9kNt3RHanIcfhUM,1311
128
117
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/hosted_services/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
129
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/hosted_services/order_integration_service.py.jinja,sha256=ibx4gynGNZiLxoxoRanQ2alx0l6CexvK9Wyr_qyiGh4,3038
130
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/hosted_services/order_observation_handler.py.jinja,sha256=KbFmFLZIJ9-3nDdWggwi46IkLERGrFKrg5Fv0rMArcE,656
131
118
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/integration_services/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
132
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/integration_services/order_reporting_service.py.jinja,sha256=cdJ7odGr4z-Ag-yMQRiDdjmOnGK4r_s7ncOLMYOuq8A,650
133
119
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/interceptors/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
134
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/interceptors/order_timing_interceptor.py.jinja,sha256=1sHnsVkmhnppTUSCHLGw7XLvJGcmTdM4Rw9uuqBBf_A,544
135
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/module.py.jinja,sha256=7chw1b1HbWCAul9sWcHlApyYvT0tD6XZLp0M6k9Y0gA,5216
120
+ python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/module.py.jinja,sha256=qGmq1ggBmxGY2B8H8gB8tEY-uxMuWpyr60l0ZAouho8,1950
136
121
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/options/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
137
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/options/order_options.py.jinja,sha256=KWROjwhiHoq4XLSFBB1upiEFW7YPgjQKVVN52jaxbsM,223
138
122
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/services/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
139
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/services/order_approval_service.py.jinja,sha256=U45LiIi71Q-pLp63HNpDuZBFrQCYR_c_4cIabrx-V-k,3301
140
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/services/order_management_service.py.jinja,sha256=BhfVZZpK6FcbqfBohU1VcFXwM-uyd_4q9Vfm0Lsw-5g,1843
141
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/services/order_query_service.py.jinja,sha256=JK5jTXJPfTcovlmo3TochsAi_DoKYPrLiuGctyi4KyI,2079
142
123
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/setting_handlers/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
143
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application/setting_handlers/approval_setting_observer.py.jinja,sha256=7n00AKKcDhPAMMQtPEwcyliM_xOmQkcN-pMJ_eO1fc8,511
144
124
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application_contracts/__init__.py.jinja,sha256=grSDmU4IKdRYZsqi56aEVvsgx92AYF2k3jlDzANqra4,51
145
125
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application_contracts/inputs/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
146
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application_contracts/inputs/approve_order.py.jinja,sha256=WV78b_z40n7IL3Pxm7CMSzZxeZktPdUwXRoccM78TfQ,182
147
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application_contracts/inputs/create_order.py.jinja,sha256=3mDGPddJ9DmK0a8PfbMTQlNds4T55LQvWy87GCQ_aBM,315
148
126
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application_contracts/integration_services/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
149
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application_contracts/integration_services/order_reporting_service.py.jinja,sha256=5_fvkJORmvmVJjhH63_of3rEW2ocXryYVdoNsTlKYMk,200
150
127
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application_contracts/module.py.jinja,sha256=_OONVbsuCD5Lu1NGgrO1P8XsZcGnyxMKsGpdpUUtgHA,1734
151
128
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application_contracts/services/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
152
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application_contracts/services/order_approval_service.py.jinja,sha256=YZMDiLprKSfzi7Nq8Wx3Bmt0vIgcT1YYiI3FIvEofTQ,561
153
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application_contracts/services/order_management_service.py.jinja,sha256=9wajkaXiEC-qLBxSOlexsDg1h23-3fKcMqbH8M4HkxU,469
154
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application_contracts/services/order_query_service.py.jinja,sha256=S0T_223keC4oLDCSrkkHt7L0_XmnmKPH4aJgmcUqcQA,426
155
129
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application_contracts/views/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
156
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application_contracts/views/order_statistics_snapshot.py.jinja,sha256=EB4pUY8MpAqRPHrLf023DHkGdialHqJnd7TgI-9FEQo,223
157
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/application_contracts/views/order_view.py.jinja,sha256=1Vj-E0uzpLrj2nbUv7YQEbxTkFXK2xWbbGb3bnjOKG8,326
158
130
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain/__init__.py.jinja,sha256=m2rqZegGy5XHzGMUVk9vwVcjEF7TufveMAELuJLynnk,60
159
131
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain/entities/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
160
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain/entities/order.py.jinja,sha256=MSzdvdo274tMYKv1nfYfE47N6XPD0kNdL4xgFAvU5dU,1970
161
132
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain/events/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
162
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain/events/order_changed.py.jinja,sha256=rppAqmZUE__uuB9LUhn82K43WjMhpkKJvpQ4LPpcArM,310
163
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain/module.py.jinja,sha256=QkQSHBHhqkui0TEkW78gkB_KB7KYBl6JhF1nFA7M2U8,1819
133
+ python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain/module.py.jinja,sha256=Hvxf536at2LA5Y-I1SOdwVRpz4SxvSsBBZhFS5MD7CU,1742
164
134
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain/repositories/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
165
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain/repositories/order_repository.py.jinja,sha256=fq-sEnbavHmMdzMl4i2pCyIefLxHNnE8TsRR_Batcvg,804
166
135
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain/seeding/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
167
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain/seeding/order_seed_contributor.py.jinja,sha256=c3moNxkFyXqaI3GBTUGyLj183BJqvtpVJ-45yEh36OM,1254
168
136
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain/services/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
169
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain/services/order_approval_service.py.jinja,sha256=Nz0r5QJlDVJrR_PmbMq543YUayO58MXUGgGTOS5UYxc,1194
170
137
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain/settings/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
171
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain/settings/approval_settings.py.jinja,sha256=azxRfoZZyFN_R5duP12uzEICU5PZMxXdK2ZNrmLFLf8,759
172
138
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain/value_objects/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
173
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain/value_objects/order_title.py.jinja,sha256=w9LB9gUzq75yE1GhZUUNt2eOBc3cZd48Z4TRZc88tBw,316
174
139
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/__init__.py.jinja,sha256=LU6KHrXMq__7fxyg38mtvQcKT53lPyyZh5NdWOJco6I,64
175
140
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/constants/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
176
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/constants/order_constants.py.jinja,sha256=3YxN9H7_F3cEg01RC22xJ1i1RuBy1hbtaO9C25USehE,71
177
141
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/enums/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
178
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/enums/order_status.py.jinja,sha256=XGsuAY0lHzPMhABp2Kw1mztHjj8VTH63ivrx_ehe3oI,104
179
142
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/errors/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
180
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/errors/order_errors.py.jinja,sha256=sbiJjLG1lIlLN_-sUvAaADShxnGHex3qg98nZIizXdI,399
181
143
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/messages/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
182
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/messages/order_messages.py.jinja,sha256=0imvpRYha7golR8cC83HGdGRV-GvdJx67aoUZGgaKdE,741
183
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/messages/order_observation.py.jinja,sha256=c-BnXSKbExBKLX5kWDkSq_FvxyLEqpG-tCl4B1yx-iw,286
184
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/module.py.jinja,sha256=0iJiL9whwHHtm324C7TAjbZDQaBb8loImArhRmAULHc,1613
144
+ python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/module.py.jinja,sha256=IPVB9LZnoyr9Mgktjg6G65dKdiP_9lhJajM3dmgLS0g,1595
185
145
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/permissions/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
186
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/permissions/order_permission_provider.py.jinja,sha256=GWQCECuEhksTxGfGfw-G3UfJ82DcTyk2C6fcI9vfyw4,802
187
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/permissions/order_permissions.py.jinja,sha256=s7oAdtLGMfDHmpO6tla1nHN9O0_ROwikMETcWMkI_5o,260
188
146
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/value_objects/__init__.py.jinja,sha256=nBHEqMXm9wNPIjUvK-sD6SdyiyD0vMZKER0Oy1OUM1I,76
189
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/domain_shared/value_objects/money.py.jinja,sha256=AwSZal8EhlbLaoOo05Ro2r5xKIlvDRyP4nKZlokGUiY,601
190
147
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/http_api/__init__.py.jinja,sha256=0YILK1GtpKuf4icbuq3C9BhggZlv5MUD65FHMth6YG0,89
191
148
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/http_api/filters/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
192
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/http_api/filters/export_filter.py.jinja,sha256=qfHBAxGV2q-hmG3ffyB4Af-HgeG9Rb75SaVsSn-WlNc,639
193
149
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/http_api/models/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
194
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/http_api/models/refresh_orders.py.jinja,sha256=0NDWyOJThlCGgZQUS1FRZSVoLBCryF9nw5qgHaps6To,136
195
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/http_api/module.py.jinja,sha256=GG_msIQ74kcD3G0pIIxsaDQ160VSxudutviLi43XzQk,4780
150
+ python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/http_api/module.py.jinja,sha256=WnXi4H5W30qyV_uZQt7ZslpFBxY5v2B_o8WDQV8cwtY,1861
196
151
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/http_api/routers/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
197
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/http_api/routers/order_files.py.jinja,sha256=GKvUT5DAeUbUn3wqfKSLM8XdM7KgQQy-ZGY2p3Iswx0,3465
198
152
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/http_api/websockets/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
199
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/http_api/websockets/order_socket.py.jinja,sha256=1QjmBavWJgS360bG3rN-csGwkjYX_l3ff9hwOZbty10,1903
200
153
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/sqlalchemy/__init__.py.jinja,sha256=orK7ZIMzTjfc5ZcFnbqqAZwe3vc3LaB4_dCisIbuUZc,50
201
154
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/sqlalchemy/migrations/__init__.py.jinja,sha256=SOgnSnlPoYAJLxOxAyJMnJ-btjLHCRwFGXxASSXaaZE,92
202
155
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/sqlalchemy/models/__init__.py.jinja,sha256=Z-KE6r2YqebbJLxeTG28gHFou7ylPiEn0u-kRJnUbzk,52
203
156
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/sqlalchemy/models/base.py.jinja,sha256=T25cme03rmEWFZtfn4dmsER11ZmD_vz3FiUYeqgGMlE,181
204
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/sqlalchemy/models/order_model.py.jinja,sha256=jIUiI8yka9NzccXG5hzl9fcXoppdfsujadSNpAsdxkU,1328
205
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/sqlalchemy/module.py.jinja,sha256=PGfDaKfUTC2_G31RUchvZVshVGRrrCrxEcpTiulxHJ4,2409
157
+ python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/sqlalchemy/module.py.jinja,sha256=7yqBjG3t6isz95CrQcwmDL_YnyUJ-L-y3vpSqbHDTbI,2327
206
158
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/sqlalchemy/repositories/__init__.py.jinja,sha256=VdqphDwvoB9nhl5Q9vHpSnmMWwDUlDp_YckRkionwWw,46
207
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/sqlalchemy/repositories/order_repository.py.jinja,sha256=pV4ULCnNqkckWfb10Rh7UrxlE_rfo6dQsAgIazyfoZA,4032
208
159
  python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/tests/__init__.py.jinja,sha256=Kbig4VsdpmVUDHx5SLPf7ZZM6S5ftVmzBxBAJIjwvng,40
209
- python_ddd_framework/developer_kit/templates/module/{{cookiecutter.module_name}}/tests/test_domain.py.jinja,sha256=7aELY93ty7EiJOS6s3GpXYE1z5CLy658rnAUElTyy-U,738
210
160
  python_ddd_framework/developer_kit/templates/project/cookiecutter.json,sha256=vmN799k9eRHAEGeYt8uUjPsusbblvgpNIsXVOsXUno4,314
211
- python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name}}/AGENTS.md,sha256=-b072ZN0GQ80Ke2QbvcIxJjinpkPZskAGw_9AyAnVFk,10656
212
- python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name}}/README.md,sha256=xJZD8VyGjAkTbYMdOAWKn3gMgCo_aYzcH0jeVqiZKZI,8605
161
+ python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name}}/AGENTS.md,sha256=u4fnjZJgqmIGf2CI9yYNRsfDLFktvGvuOVm2M-DQmKs,13059
162
+ python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name}}/README.md,sha256=i65NyuY-MXu1eZ3M_Ob5hFpcqCSd8hzc3iYr3Cn27g4,11146
213
163
  python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name}}/backend/.dockerignore,sha256=TG053vIzikxG8h53vCcU_s5wcr7p4GEKwsedbrRrSOo,71
214
164
  python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name}}/backend/.gitignore,sha256=OF6nwgb-RiP8EAXc5osbk3bsOEYkk0JaV99v3FcglTU,66
215
165
  python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name}}/backend/.python-version,sha256=lN0hZ-3c-Wk_uFRrQasUfy9YJrXrdvSzYKhuHeXIXbY,34
@@ -219,12 +169,12 @@ python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name
219
169
  python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name}}/backend/compose.production.yaml.jinja,sha256=_6bOPW2232spgvInM1PA9lgRZMlWdkf_HW7GgTM0s0Q,748
220
170
  python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name}}/backend/pyproject.toml.jinja,sha256=zZ-kDjgfOYo4g35VLoctEEoyvlZm9fEB2ddHW30JzUs,932
221
171
  python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name}}/backend/src/host/__init__.py.jinja,sha256=RfLT7dqPnSotCDorSp6Taz9jBYOmepu6De_wZNelWZ8,74
222
- python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name}}/backend/src/host/main.py.jinja,sha256=aFaJNbpcU6fZjF0oWB8NTe2f18fucbFQmZ3PwVHWnYA,1868
172
+ python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name}}/backend/src/host/main.py.jinja,sha256=SPxJ86SW1dx-BuoWITWifq-6NseoxnVMLTufcFFsxF4,1996
223
173
  python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name}}/backend/src/host/module.py.jinja,sha256=6j63muRR7tQmYIFso-egk8L5_Zw57I61ijWR8SDpw5U,3235
224
174
  python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name}}/backend/tests/conftest.py.jinja,sha256=I_SlSxioBsCFNJLM52iM-neYBJR71qOUn7C4dI9t-7I,149
225
175
  python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name}}/backend/tests/host/test_http.py.jinja,sha256=pmiz6k0oWWrPeW_rVG2Ynibg4j3yuKvgvYFc0K7J_no,2766
226
- python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name}}/docs/architecture.md,sha256=oQw2Ca-63qkkIFwJx0T6uSZMieahPPvhpsjTalaXoPY,19536
227
- python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name}}/docs/development.md,sha256=mYEpq1GhPtxIUFcoonbUnN_s1xIWFn06CXSdksSILsU,41251
176
+ python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name}}/docs/architecture.md,sha256=qU6lE4iwhTUDCY3OvtSgNYw99k8JGaOsyrmdaFt_Py4,26920
177
+ python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name}}/docs/development.md,sha256=hEn_ucr8NmZnEp80TyAYB1IoLMWUoh9Hk8wCBzCizDM,53182
228
178
  python_ddd_framework/developer_kit/templates/project/{{cookiecutter.project_name}}/scripts/.gitkeep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
229
179
  python_ddd_framework/developer_kit/wiring.py,sha256=80ZhxpGXK6NP3b_BTTc1kt3oIU21MU70cT9kgm8ZgAE,7835
230
180
  python_ddd_framework/diagnostics/__init__.py,sha256=HdgzjQqMJ_SUGKJc5EcQ5PL1rM4GcTeem-L0q1r7vjQ,455
@@ -266,8 +216,10 @@ python_ddd_framework/extensions/catalog.py,sha256=khN3pHIFoWLyLf_cemToDyLYMsnp9a
266
216
  python_ddd_framework/extensions/contracts.py,sha256=MKYIko55LuJUDne_othsclqyDZ0TujJZkhZpkqomgrs,3059
267
217
  python_ddd_framework/extensions/models.py,sha256=wwv2IoL48hbNwk4BLZgqEPejoZxg7Yt3X5tOEy-wxVo,5969
268
218
  python_ddd_framework/extensions/module.py,sha256=V-m2tO_lTvrtBYxBltpc6qvRndYtPUIErPacL7qh--4,799
269
- python_ddd_framework/fastapi/__init__.py,sha256=L1FTfMPpVp7WR-aPC-Rxh8ZXfjjLRbp7XFfyRf5U5cc,1396
270
- python_ddd_framework/fastapi/action.py,sha256=8gzfu7iCn8n-3EDFlXvx8BxZ9Lfopx59eeEdQ0H9WmQ,7122
219
+ python_ddd_framework/fastapi/__init__.py,sha256=H_c5k2XhbaNdjRXXxfnd1ibwApaDtSh5f4B6KMlypuE,1473
220
+ python_ddd_framework/fastapi/access.py,sha256=SWMB_ILM8iItiS0gftX1rNmKy9gO2BCJDaEiWa54ScI,5346
221
+ python_ddd_framework/fastapi/access_options.py,sha256=iXP7X4JCZ-7TcifgOdFB65RhZdZNVKF7l21AUKD-3ws,383
222
+ python_ddd_framework/fastapi/action.py,sha256=OnOrnlgS2xEkpMqVX0s_y2uS4MaGR7QdKfS9bJWlx1U,7459
271
223
  python_ddd_framework/fastapi/adapter.py,sha256=9cDdBX0uLp6kiorv49eOX15sNxJM4U8rqu8GMjOj6Mk,13376
272
224
  python_ddd_framework/fastapi/application_services.py,sha256=RixZNC5niVAWzShUqfxFU_THHQlzxTbwfUTdxETU3qM,11909
273
225
  python_ddd_framework/fastapi/background.py,sha256=MZASgFRz1tQkzMo7A33ZA41qS90wpboLrOdL3RHc87w,1616
@@ -278,25 +230,26 @@ python_ddd_framework/fastapi/filters.py,sha256=aQQB4imJa9XaZUsVkIwmkZ9iZH54P_36w
278
230
  python_ddd_framework/fastapi/health.py,sha256=GjHN8AnUAU5LpeUl9-U7ScnI7deeHJ3u4pm4fOnCMA0,1312
279
231
  python_ddd_framework/fastapi/http.py,sha256=W0jFoqVYOc_rvT7BGa9m1btEThixX7o0ujt_TMxegsg,2725
280
232
  python_ddd_framework/fastapi/http_router.py,sha256=pgfzy7zcUgy8bNOUTIRn7vgeSHLLcVcVbufLute_m_Y,9254
281
- python_ddd_framework/fastapi/manual_action.py,sha256=f-0GawXtqWIcScN_0hd43uhDNw3EAyZwzmNSQwdlsh8,4284
233
+ python_ddd_framework/fastapi/manual_action.py,sha256=1HMqRttXK1JiN3uuKGmYuss9hRAzussI-dilGhGfns8,5992
282
234
  python_ddd_framework/fastapi/middleware.py,sha256=uIT3KFyVPy-ruBvNzjANclqLp4RAx3X01F9_yN3JEMQ,3968
283
- python_ddd_framework/fastapi/module.py,sha256=ZODzWZGj1f5dtjLPq-1WCaiaxyVxqWKyOfvqusebatQ,510
235
+ python_ddd_framework/fastapi/module.py,sha256=aqVUC0Ups8IzdUR-BFc7hgAh7hHB5fcWNMmzc02TOOo,633
284
236
  python_ddd_framework/fastapi/parameters.py,sha256=AiAppAiY8m7QUT6sqe_fWmwoQ-xk2Afn2ccMv45DWvs,3858
285
237
  python_ddd_framework/fastapi/realtime/__init__.py,sha256=-GtZxXilBiLP3-jQpRa7HPKOMLFNh1sWeV_bcP9iONo,360
286
- python_ddd_framework/fastapi/realtime/authentication.py,sha256=_FBZiAfe0On-jvtemCqfTX8MrlBhsY-X5etcsuqmpcc,6909
238
+ python_ddd_framework/fastapi/realtime/authentication.py,sha256=sIBB3387KV_O2TZ23_bDqP4jBjkWgmPvAaPkL1Y_AXE,7401
287
239
  python_ddd_framework/fastapi/realtime/connection.py,sha256=YSEaRbmKpcrNx8sfh0t4Dn5_CkC4TJjOv5yqbco3Xsc,6099
288
240
  python_ddd_framework/fastapi/realtime/module.py,sha256=mw_99MpA8UdGWuuRkizNmzAhUW6L4lx5v2QUiKewibY,1528
289
- python_ddd_framework/fastapi/realtime/options.py,sha256=5xiv2pgiKb2FG3asZp5Q1jPYiZf6JmzXhFyqRTFj-Gc,1963
290
- python_ddd_framework/fastapi/realtime/runtime.py,sha256=h9A_rOpyBp9Wk9_4TZ5CHyqo23CR7AkyFUPouNs0R2w,14284
291
- python_ddd_framework/fastapi/request_context.py,sha256=g1nUEuJKY2UcUDgs-yrWPUbjGAws9bBI9YCVDqGsAgQ,10125
241
+ python_ddd_framework/fastapi/realtime/options.py,sha256=wfEPu6q6dmydx5m6h9E_muieLDEqcNTQquvC77haieI,1897
242
+ python_ddd_framework/fastapi/realtime/runtime.py,sha256=OL0tAOcLDUY_IXlkzXMLzPkAynpa1jExbtliDbmtct8,15197
243
+ python_ddd_framework/fastapi/request_context.py,sha256=3EWO44HgumKQOFHeyP_dVF3qTRbo1lzbhR1K1qSvxqo,10592
292
244
  python_ddd_framework/fastapi/route_integrity.py,sha256=_tDeeE6XHbsgrA2i1m6Yz_I9NU_JVuYb1E3iMvbwMxE,3174
293
- python_ddd_framework/fastapi/routing.py,sha256=hKCf6Sx8IICkUhuN4NDOluj9RX7KSWyGIRL_S3wexhY,15959
294
- python_ddd_framework/fastapi/server.py,sha256=zk2b5QZkdZsTgzyhffWJNNB02XomRExRRVYT75x6GC4,7072
295
- python_ddd_framework/fastapi/service_endpoints.py,sha256=2uUDKfyiiVpNcXbFXeYh66w8u7SeW3J-mUVj-jciWkc,7258
245
+ python_ddd_framework/fastapi/routing.py,sha256=E4rjQPC58SmjfN8_HBQXWgcGMWoc_oZw3XvMG2mny64,16353
246
+ python_ddd_framework/fastapi/server.py,sha256=o8klk9sUJvBuLRBM8VU5bp1pFJwRHYafrImI5VGK8GQ,7538
247
+ python_ddd_framework/fastapi/service_endpoints.py,sha256=RpbC-9sEu2JF2JiwsogKnp7bpOhgvgjw6EtAadLzHuM,7549
296
248
  python_ddd_framework/fastapi/service_routes.py,sha256=qOWYcIkOtIdYcMXdDIHan0DtklkRieqtBWXd9BQPuBU,9329
297
249
  python_ddd_framework/fastapi/settings.py,sha256=ix_iplijT4qvxqix0cP99ZNeP9U_yQ9F_n-Zz7FPLUQ,1463
250
+ python_ddd_framework/fastapi/streaming.py,sha256=D1TFx6tFyvEOk7W8enoGMUwf0f0S_5mYlgnIdRSYOJ8,4176
298
251
  python_ddd_framework/fastapi/tracing.py,sha256=oKdPbDAZ-VQUGCOcaNMIAQNwgi6OA2nOA8wffn9ZE70,2494
299
- python_ddd_framework/fastapi/transfer.py,sha256=1qj3CU41SaMrBBLkmaFFyZvQE9mCDTjT6aLLJmTaM5I,6186
252
+ python_ddd_framework/fastapi/transfer.py,sha256=EkP6cuqsDSlZ97YWnnqPMwnvDw41kU2YRu6ChROMhBE,12348
300
253
  python_ddd_framework/fastapi/upload_limits.py,sha256=vK1wuH34zrqrZhg6WDwMn730nX9fUDsMFhBbHKmv2kg,1959
301
254
  python_ddd_framework/fastapi/uploads.py,sha256=SUQVB7tEXUXti6GFUenBNdlW3YaIchtCi0GcBJGhU88,3839
302
255
  python_ddd_framework/hosted_services/__init__.py,sha256=r9yz2PpCUgpxvZsv1WyVrzslvfYCcfmAEsFIlrxejx8,991
@@ -345,7 +298,7 @@ python_ddd_framework/invocation/arguments.py,sha256=7LRZfOifZwWHc9EqtQYda83sBrqp
345
298
  python_ddd_framework/invocation/callables.py,sha256=E0LZzxUxrjvo8i_Jqa_YjUns82y6q9br0tKZYbFx9Uk,6705
346
299
  python_ddd_framework/invocation/contracts.py,sha256=VxT-kj4v90cq1yUx9lTs-enDeqzofRG5pecPqiazcWE,908
347
300
  python_ddd_framework/invocation/contribution.py,sha256=DcNZg4qRhDX7eXypQaesGIhRtsyyZ4iNn5ATg6U8Qpg,2017
348
- python_ddd_framework/invocation/dispatcher.py,sha256=aTCLhnn6IdcwbayC_PIg7dm7yCW6MoIkWYGsgMkJMjs,11588
301
+ python_ddd_framework/invocation/dispatcher.py,sha256=7ZByWfQa8rUDaNded5sFQkkRXRP4ngmppC-ikjfoN7w,10645
349
302
  python_ddd_framework/invocation/entries.py,sha256=0ubnHAkqY7uFgW4QJtdYw9__KPsKuNJmcvw-VdksMJo,1080
350
303
  python_ddd_framework/invocation/entrypoints.py,sha256=9VKoYHW2LM8uwSyrbOGHHujWboy8f8YmCEOjUwfX5N0,4183
351
304
  python_ddd_framework/invocation/execution.py,sha256=A4kzeEK8Ii8_5T-jkdw__2d2Tq-p4M6K-__VKpJw7hE,7267
@@ -358,7 +311,7 @@ python_ddd_framework/invocation/methods.py,sha256=EjqfoZJbdXxY1ocIBYBuUMskK59c0H
358
311
  python_ddd_framework/invocation/module.py,sha256=FQldD1G9vlsiw48JLwQV9ZfM-tnsTuGGJO2tmQv3Vb0,4387
359
312
  python_ddd_framework/invocation/policies.py,sha256=1RE1yQKZN2NMPZOQXQcqVIwaInb0Oz3EFqujqxTfXFw,1879
360
313
  python_ddd_framework/invocation/runtime.py,sha256=U7dziK1Rq-gmElCM6VnBvyegHj947Ax87R-6Wu6QDI0,18519
361
- python_ddd_framework/invocation/scopes.py,sha256=Mx2fLnXMeUQmTMHRqeh9S_bWCjROmhU3kRdM9hBDq4w,3622
314
+ python_ddd_framework/invocation/scopes.py,sha256=NNMGTHFpsMb3AImHih9z_ASR6mKl6JJuPLu4UGwqYrI,3724
362
315
  python_ddd_framework/invocation/signature.py,sha256=EfzIeOggbE25juu1j_cCpgGM-OouLHLtFxH8oIE8Xvs,2083
363
316
  python_ddd_framework/invocation/validation.py,sha256=sy3YyGFtQ-Y69XcjzfJw7PO13zwD8guzvoOt2TG2vd8,986
364
317
  python_ddd_framework/lifecycle/__init__.py,sha256=8L_wDnclU6xAPmPAtx2iGX8lf4qFczcE_ubqFsGfhJA,745
@@ -388,7 +341,7 @@ python_ddd_framework/notifications/module.py,sha256=UlLmEOGyMB5kBg6vd_1QBGhItKZf
388
341
  python_ddd_framework/observability/__init__.py,sha256=Qg_2CPs0MTexfNvu9KvD0K59T-_9r_K3AWHe6bWKgwI,193
389
342
  python_ddd_framework/observability/context.py,sha256=GOXpe34Dt46h3mZ7qrm2t9NWYGZb1gMpr8EsJY4N-PY,1546
390
343
  python_ddd_framework/observability/export.py,sha256=HitQCY3b7n1kIyk4tI7GuVAthhX5fAJUnRdqfQrOOT4,2639
391
- python_ddd_framework/observability/formatting.py,sha256=72WSSYTNhKMEn7NjFyih8ekFFUxYfS0txXw1UTHU5xY,3352
344
+ python_ddd_framework/observability/formatting.py,sha256=6eiCnEIomaye2BeQsf8NNSRucrNYuE8sBQEfLsRHAjw,3381
392
345
  python_ddd_framework/observability/logging.py,sha256=pTrBkX2pYfCDCypF8t8x9dcUPe0pCYirqyMWTgPQ9wc,4392
393
346
  python_ddd_framework/observability/options.py,sha256=LHE_EWw6TKHGqPZKzJIvDJS5l5Fb8kTbzmwUl19diGw,1768
394
347
  python_ddd_framework/observability/tracing.py,sha256=ceTpNU46761zdjwojUJyE15xMZnlkQUJeyBUtQ3Bx6o,3703
@@ -494,14 +447,14 @@ python_ddd_framework/unit_of_work/__init__.py,sha256=Vmm9NgsqvFURwW0KHbPAyP54dl3
494
447
  python_ddd_framework/unit_of_work/contracts.py,sha256=vgBCTdhVS2NtFJe1TvhkgD70Gtw6M8w2eyMVrKCwh94,9654
495
448
  python_ddd_framework/unit_of_work/errors.py,sha256=lQH40FnyiZpFQ-WM-DfiZY57YtjFMoXgzG7fsMztzxE,1133
496
449
  python_ddd_framework/unit_of_work/lifecycle.py,sha256=cr08KIRwXS3up0-pkB07UgAgvDlKY1IMZYJppDkTjK8,518
497
- python_ddd_framework/unit_of_work/manager.py,sha256=Myes-OlSsMLnGZDH_HtHq1EM8u8aUHREPuAFfb-WyUc,10634
450
+ python_ddd_framework/unit_of_work/manager.py,sha256=jLTe3l_FvnljiFBcSDP5mdRqjMGtyCigvfqFWUo8JTU,10966
498
451
  python_ddd_framework/unit_of_work/module.py,sha256=EjsUtCG7w56NmLU_xqBRiwJ65Mw5hYrXpUPanVYV0Qc,2479
499
452
  python_ddd_framework/unit_of_work/options.py,sha256=AVcEmwwn39qvj8PLQetBeGzdU_eblABGuNLDIQU5tyI,3365
500
453
  python_ddd_framework/validation/__init__.py,sha256=nTN_BgIXMLHeUtMgSj2hpisWc1_sk6UWTapk30oh1us,100
501
454
  python_ddd_framework/validation/models.py,sha256=Ydz5ZYgqYMPZEXi9A3DA6beN5lD9AcMaImnxDf1aRXs,1737
502
- python_ddd_framework-0.6.0.dist-info/licenses/LICENSE,sha256=2sSWLZdtk4EhG2GlwpksXzmyux-G6Qiov0D27lE_bqw,805
503
- python_ddd_framework-0.6.0.dist-info/licenses/src/python_ddd_framework/background_jobs/pgqueuer/UPSTREAM_LICENSE.txt,sha256=0lCGUd5Pke2Up1Kqn1kRnHcwLlBz60E8xvR7WL4k_kE,1066
504
- python_ddd_framework-0.6.0.dist-info/WHEEL,sha256=766qEDcnZQDL36MOdWBQ0gowd8OjUWAOwMNC7Vgvxts,81
505
- python_ddd_framework-0.6.0.dist-info/entry_points.txt,sha256=CMy4XBD8IKGUfHwe0YBmHmSJtjfnA3yyDHqsMZCLsc8,447
506
- python_ddd_framework-0.6.0.dist-info/METADATA,sha256=bYYumBr01AbN0h6r6lKfSkvTAt33r5BU3bVJ7zSKw90,60461
507
- python_ddd_framework-0.6.0.dist-info/RECORD,,
455
+ python_ddd_framework-0.7.0.dist-info/licenses/LICENSE,sha256=2sSWLZdtk4EhG2GlwpksXzmyux-G6Qiov0D27lE_bqw,805
456
+ python_ddd_framework-0.7.0.dist-info/licenses/src/python_ddd_framework/background_jobs/pgqueuer/UPSTREAM_LICENSE.txt,sha256=0lCGUd5Pke2Up1Kqn1kRnHcwLlBz60E8xvR7WL4k_kE,1066
457
+ python_ddd_framework-0.7.0.dist-info/WHEEL,sha256=cmC5s21ojypbVslldL7IJq3hjZH-tINy4rziKePFsG0,81
458
+ python_ddd_framework-0.7.0.dist-info/entry_points.txt,sha256=CMy4XBD8IKGUfHwe0YBmHmSJtjfnA3yyDHqsMZCLsc8,447
459
+ python_ddd_framework-0.7.0.dist-info/METADATA,sha256=WZ28DdKm19LsVDQU-bXI3vDRK3WPlOOUrpzw4G_BR9c,64292
460
+ python_ddd_framework-0.7.0.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: uv 0.12.20
2
+ Generator: uv 0.12.23
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -1,45 +0,0 @@
1
- from datetime import timedelta
2
-
3
- from modules.{{ cookiecutter.module_name }}.application.background_jobs.order_approval.payload import (
4
- ApprovalPayload,
5
- )
6
- from modules.{{ cookiecutter.module_name }}.application.options.order_options import {{ cookiecutter.class_prefix }}Options
7
- from modules.{{ cookiecutter.module_name }}.domain.repositories.order_repository import OrderRepository
8
- from modules.{{ cookiecutter.module_name }}.domain.services.order_approval_service import OrderApprovalService
9
- from modules.{{ cookiecutter.module_name }}.domain_shared.constants.order_constants import MODULE_NAME
10
- from modules.{{ cookiecutter.module_name }}.domain_shared.enums.order_status import OrderStatus
11
- from modules.{{ cookiecutter.module_name }}.domain_shared.errors.order_errors import APPROVAL_DISABLED
12
-
13
- from python_ddd_framework import Options
14
- from python_ddd_framework.background_jobs import BackgroundJobContext, BackgroundJobHandler
15
- from python_ddd_framework.errors import BusinessError
16
-
17
-
18
- class ApprovalJob(BackgroundJobHandler[ApprovalPayload]):
19
- name = f"{MODULE_NAME}.approve"
20
- version = 1
21
- current = True
22
- timeout = timedelta(seconds=30)
23
-
24
- def __init__(
25
- self,
26
- repository: OrderRepository,
27
- approval: OrderApprovalService,
28
- options: Options[{{ cookiecutter.class_prefix }}Options],
29
- ) -> None:
30
- self._repository, self._approval, self._options = repository, approval, options
31
-
32
- async def execute(self, payload: ApprovalPayload, context: BackgroundJobContext) -> None:
33
- # 业务扩展:这里执行可重试的后台用例;任务可能重复投递,先核对当前业务状态再产生副作用。
34
- # 把审批替换为自己的业务,并同步调整载荷;不要删除幂等判断或吞掉应触发重试的异常。
35
- if self._options.value.allow_background_approval:
36
- order = await self._repository.find(payload.order_id)
37
- if order is not None and order.status is OrderStatus.PENDING:
38
- try:
39
- await self._approval.approve(order)
40
- except BusinessError as error:
41
- # 保留后台业务的既有语义:设置禁止时跳过;其他失败仍交给任务重试。
42
- if error.definition == APPROVAL_DISABLED:
43
- return
44
- raise
45
- await self._repository.save(order)
@@ -1,8 +0,0 @@
1
- from uuid import UUID
2
-
3
- from pydantic import BaseModel, ConfigDict
4
-
5
-
6
- class ApprovalPayload(BaseModel):
7
- model_config = ConfigDict(frozen=True, extra="forbid")
8
- order_id: UUID
@@ -1,35 +0,0 @@
1
- import logging
2
- from datetime import UTC, datetime, timedelta
3
-
4
- from modules.{{ cookiecutter.module_name }}.application.background_jobs.order_statistics.payload import (
5
- StatisticsPayload,
6
- )
7
- from modules.{{ cookiecutter.module_name }}.application.caching.statistics_cache import OrderStatisticsCacheItem
8
- from modules.{{ cookiecutter.module_name }}.application_contracts.integration_services.order_reporting_service import (
9
- OrderReportingService,
10
- )
11
- from modules.{{ cookiecutter.module_name }}.domain_shared.constants.order_constants import MODULE_NAME
12
-
13
- from python_ddd_framework.background_jobs import BackgroundJobContext, BackgroundJobHandler
14
- from python_ddd_framework.caching import DistributedCache
15
-
16
-
17
- class OrderStatisticsJob(BackgroundJobHandler[StatisticsPayload]):
18
- name = f"{MODULE_NAME}.scheduled-statistics"
19
- version = 1
20
- current = True
21
- timeout = timedelta(seconds=10)
22
-
23
- def __init__(self, reporting: OrderReportingService, cache: DistributedCache[OrderStatisticsCacheItem]) -> None:
24
- self._reporting, self._cache = reporting, cache
25
-
26
- async def execute(self, payload: StatisticsPayload, context: BackgroundJobContext) -> None:
27
- count = await self._reporting.get_count()
28
- await self._cache.set(
29
- "current",
30
- OrderStatisticsCacheItem(
31
- count=count,
32
- captured_at=datetime.now(UTC),
33
- ),
34
- )
35
- logging.getLogger(__name__).info("Scheduled order statistics: %s", count)
@@ -1,5 +0,0 @@
1
- from pydantic import BaseModel, ConfigDict
2
-
3
-
4
- class StatisticsPayload(BaseModel):
5
- model_config = ConfigDict(frozen=True, extra="forbid")
@@ -1,15 +0,0 @@
1
- """周期入队声明;Module 显式引用后才启用,处理体由持久 Job 拥有。"""
2
-
3
- from modules.{{ cookiecutter.module_name }}.domain_shared.constants.order_constants import MODULE_NAME
4
-
5
- from python_ddd_framework.background_jobs import BackgroundJobSchedule
6
-
7
- from .handler import OrderStatisticsJob
8
- from .payload import StatisticsPayload
9
-
10
- STATISTICS_SCHEDULE = BackgroundJobSchedule(
11
- name=f"{MODULE_NAME}.statistics.every-ten-seconds",
12
- cron="* * * * * */10",
13
- job=OrderStatisticsJob,
14
- payload=StatisticsPayload(),
15
- )
@@ -1,28 +0,0 @@
1
- import logging
2
- from datetime import timedelta
3
-
4
- from modules.{{ cookiecutter.module_name }}.domain.repositories.order_repository import OrderRepository
5
- from modules.{{ cookiecutter.module_name }}.domain_shared.constants.order_constants import MODULE_NAME
6
-
7
- from python_ddd_framework import BackgroundWorker, BackgroundWorkerContext
8
- from python_ddd_framework.distributed_lock import DistributedLock
9
-
10
- logger = logging.getLogger(__name__)
11
-
12
-
13
- class OrderMaintenanceWorker(BackgroundWorker):
14
- name = f"{MODULE_NAME}.maintenance"
15
- enabled = False
16
- interval = timedelta(seconds=30)
17
- iteration_timeout = timedelta(seconds=10)
18
-
19
- def __init__(self, repository: OrderRepository, lock: DistributedLock) -> None:
20
- self._repository, self._lock = repository, lock
21
-
22
- async def run_iteration(self, context: BackgroundWorkerContext) -> None:
23
- # 租约失效由框架请求取消并等待本轮清理;业务不吞 CancelledError。
24
- async with self._lock.acquire(f"{MODULE_NAME}:maintenance") as acquired:
25
- if acquired:
26
- # 业务扩展:需要互斥的维护逻辑写在成功持锁的分支内;当前读取并计数只是演示。
27
- orders = await self._repository.get_list()
28
- logger.info("Order maintenance completed: %s", len(orders))
@@ -1,26 +0,0 @@
1
- import logging
2
- from datetime import timedelta
3
-
4
- from modules.{{ cookiecutter.module_name }}.application_contracts.integration_services.order_reporting_service import (
5
- OrderReportingService,
6
- )
7
- from modules.{{ cookiecutter.module_name }}.domain_shared.constants.order_constants import MODULE_NAME
8
-
9
- from python_ddd_framework import BackgroundWorker, BackgroundWorkerContext
10
-
11
- logger = logging.getLogger(__name__)
12
-
13
-
14
- class OrderStatisticsWorker(BackgroundWorker):
15
- name = f"{MODULE_NAME}.statistics"
16
- enabled = False
17
- interval = timedelta(minutes=5)
18
- iteration_timeout = timedelta(seconds=10)
19
-
20
- def __init__(self, reporting: OrderReportingService) -> None:
21
- self._reporting = reporting
22
-
23
- async def run_iteration(self, context: BackgroundWorkerContext) -> None:
24
- # 业务扩展:这里是一轮周期统计的处理体;替换统计/汇总逻辑,不自行启动 while 循环或线程。
25
- # 启用这个默认关闭的示例 Worker 前,先确定自己的执行周期和失败处理要求。
26
- logger.info("Order count: %s", await self._reporting.get_count())
@@ -1,9 +0,0 @@
1
- from modules.{{ cookiecutter.module_name }}.application_contracts.views.order_view import OrderView
2
- from modules.{{ cookiecutter.module_name }}.domain_shared.constants.order_constants import MODULE_NAME
3
-
4
- from python_ddd_framework.caching import cache_name
5
-
6
-
7
- @cache_name(f"{MODULE_NAME}.view")
8
- class OrderCacheItem(OrderView):
9
- pass
@@ -1,9 +0,0 @@
1
- from modules.{{ cookiecutter.module_name }}.application_contracts.views.order_statistics_snapshot import OrderStatisticsSnapshot
2
- from modules.{{ cookiecutter.module_name }}.domain_shared.constants.order_constants import MODULE_NAME
3
-
4
- from python_ddd_framework.caching import cache_name
5
-
6
-
7
- @cache_name(f"{MODULE_NAME}.statistics")
8
- class OrderStatisticsCacheItem(OrderStatisticsSnapshot):
9
- pass
@@ -1,23 +0,0 @@
1
- from modules.{{ cookiecutter.module_name }}.application.caching.order_cache import OrderCacheItem
2
- from modules.{{ cookiecutter.module_name }}.domain.events.order_changed import OrderChanged
3
- from modules.{{ cookiecutter.module_name }}.domain_shared.messages.order_messages import OrderChangedMessage
4
-
5
- from python_ddd_framework import LocalEventPhase, local_event_handler
6
- from python_ddd_framework.caching import DistributedCache
7
- from python_ddd_framework.realtime import RealtimePublisher
8
-
9
-
10
- @local_event_handler(phase=LocalEventPhase.AFTER_COMMIT)
11
- class OrderChangedHandler:
12
- def __init__(self, cache: DistributedCache[OrderCacheItem], realtime: RealtimePublisher) -> None:
13
- self._cache, self._realtime = cache, realtime
14
-
15
- async def handle(self, event: OrderChanged) -> None:
16
- # 业务扩展:这里处理提交后的缓存失效/在线通知,替换自己的事件、缓存定义和消息载荷。
17
- # 必须随业务一起回滚的规则应放在聚合或 DOMAIN 阶段;这里失败不会撤销已经提交的数据。
18
- await self._cache.remove(str(event.order_id))
19
- if event.user_id is not None:
20
- await self._realtime.send_to_user(
21
- event.user_id,
22
- OrderChangedMessage(id=event.order_id, status=event.status),
23
- )
@@ -1,71 +0,0 @@
1
- """可选外部线程集成示例;替换线程生产逻辑即可接入 SDK,不另建容器或任务执行器。"""
2
-
3
- import asyncio
4
- import logging
5
- from threading import Event, Thread
6
-
7
- from python_ddd_framework import (
8
- HostedService,
9
- HostedServiceContext,
10
- HostedServiceInvocationRejectedError,
11
- ShutdownReason,
12
- )
13
-
14
- from modules.{{ cookiecutter.module_name }}.application_contracts.integration_services.order_reporting_service import (
15
- OrderReportingService,
16
- )
17
-
18
-
19
- async def observe_integration(reporting: OrderReportingService) -> None:
20
- count = await reporting.get_count()
21
- logging.getLogger(__name__).info("External integration callback observed %s orders", count)
22
-
23
-
24
- class OrderIntegrationService(HostedService):
25
- def __init__(self) -> None:
26
- self._stop = Event()
27
- self._prepare = Event()
28
- self._callback_done = Event()
29
- self._stopping_context: HostedServiceContext | None = None
30
- self._callback_error: BaseException | None = None
31
- self._thread: Thread | None = None
32
-
33
- async def start(self, context: HostedServiceContext) -> None:
34
- await context.call(observe_integration)
35
- self._thread = Thread(target=self._receive, args=(context,), name=__name__)
36
- self._thread.start()
37
-
38
- def _receive(self, context: HostedServiceContext) -> None:
39
- # submit_call 只能来自外部线程;Future.result 等待同一正式 invocation 完成。
40
- try:
41
- try:
42
- context.submit_call(observe_integration).result()
43
- except HostedServiceInvocationRejectedError:
44
- pass # 普通准入可能已经关闭;收尾只使用 stopping 新提供的 context。
45
- self._prepare.wait()
46
- stopping = self._stopping_context
47
- if stopping is not None:
48
- stopping.submit_call(observe_integration).result()
49
- except BaseException as error: # noqa: BLE001 -- 线程故障转交 stopping 重新抛出。
50
- self._callback_error = error
51
- finally:
52
- self._callback_done.set()
53
- self._stop.wait()
54
-
55
- async def stopping(self, context: HostedServiceContext, reason: ShutdownReason) -> None:
56
- # 独立业务调用完成后再等 SDK 回调,不跨线程传 scope,也不跨等待持有事务。
57
- await context.call(observe_integration)
58
- self._stopping_context = context
59
- self._prepare.set()
60
- await asyncio.to_thread(self._callback_done.wait)
61
- if self._callback_error is not None:
62
- raise RuntimeError("External integration callback failed") from self._callback_error
63
-
64
- async def stop(self, reason: ShutdownReason) -> None:
65
- # start 部分失败时 stopping 不会执行;仍须唤醒并等待实际线程退出。
66
- self._stop.set()
67
- self._prepare.set()
68
- if self._thread is not None:
69
- await asyncio.to_thread(self._thread.join)
70
- self._thread = None
71
- logging.getLogger(__name__).info("External integration thread stopped")
@@ -1,16 +0,0 @@
1
- """可选线程集成的快照消费者;通过消息能力进入一次受管理调用。"""
2
-
3
- import logging
4
-
5
- from python_ddd_framework import MessageHandler, unit_of_work
6
-
7
- from modules.{{ cookiecutter.module_name }}.domain_shared.messages.order_observation import (
8
- OrderObservation,
9
- )
10
-
11
-
12
- class OrderObservationHandler(MessageHandler[OrderObservation]):
13
- @unit_of_work(disabled=True)
14
- async def handle(self, message: OrderObservation) -> None:
15
- # 替换为快照应用逻辑;若需要保存数据,显式选择事务而非把接收等待放入 UoW。
16
- logging.getLogger(__name__).info("Observed order count: %s", message.count)