DefStream 0.1.16__tar.gz → 0.1.18__tar.gz

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 (233) hide show
  1. {defstream-0.1.16 → defstream-0.1.18}/.github/ISSUE_TEMPLATE/01.feature.yml +0 -2
  2. {defstream-0.1.16 → defstream-0.1.18}/.github/ISSUE_TEMPLATE/02.bug.yml +0 -2
  3. {defstream-0.1.16 → defstream-0.1.18}/.github/ISSUE_TEMPLATE/03.fix.yml +0 -2
  4. {defstream-0.1.16 → defstream-0.1.18}/.github/ISSUE_TEMPLATE/04.task.yml +0 -2
  5. {defstream-0.1.16 → defstream-0.1.18}/.github/workflows/ci.yml +24 -61
  6. defstream-0.1.18/DefStream.egg-info/PKG-INFO +92 -0
  7. {defstream-0.1.16 → defstream-0.1.18}/DefStream.egg-info/SOURCES.txt +57 -3
  8. defstream-0.1.18/PKG-INFO +92 -0
  9. defstream-0.1.18/README.en.md +73 -0
  10. defstream-0.1.18/README.md +73 -0
  11. defstream-0.1.18/README.setup.md +59 -0
  12. defstream-0.1.18/docs/Contracts.en.md +175 -0
  13. defstream-0.1.18/docs/Contracts.md +168 -0
  14. defstream-0.1.18/docs/GettingStarted.en.md +191 -0
  15. defstream-0.1.18/docs/GettingStarted.md +186 -0
  16. defstream-0.1.18/docs/LifecycleHooks.en.md +214 -0
  17. defstream-0.1.18/docs/LifecycleHooks.md +210 -0
  18. defstream-0.1.18/docs/Operations.en.md +176 -0
  19. defstream-0.1.18/docs/Operations.md +167 -0
  20. defstream-0.1.18/docs/README.en.md +38 -0
  21. defstream-0.1.18/docs/README.md +38 -0
  22. defstream-0.1.18/docs/RabbitMQ.en.md +294 -0
  23. defstream-0.1.18/docs/RabbitMQ.md +283 -0
  24. defstream-0.1.18/docs/Redis.en.md +229 -0
  25. defstream-0.1.18/docs/Redis.md +225 -0
  26. defstream-0.1.18/docs/Tasks.en.md +174 -0
  27. defstream-0.1.18/docs/Tasks.md +171 -0
  28. defstream-0.1.18/instructions/CODE.instructions.md +32 -0
  29. defstream-0.1.18/instructions/DOCS.instructions.md +55 -0
  30. defstream-0.1.18/instructions/README.instructions.md +36 -0
  31. defstream-0.1.18/issues/fix/26/IMPLEMENTS.md +34 -0
  32. defstream-0.1.18/issues/fix/26/ISSUE.md +13 -0
  33. defstream-0.1.18/issues/fix/26/README.md +5 -0
  34. defstream-0.1.18/issues/fix/26/REQUIREMENTS.md +59 -0
  35. defstream-0.1.18/issues/fix/29/ISSUE.md +13 -0
  36. defstream-0.1.18/issues/fix/29/README.md +5 -0
  37. defstream-0.1.18/issues/fix/29/REQUIREMENTS.md +48 -0
  38. defstream-0.1.18/issues/fix/29/TASK.md +26 -0
  39. defstream-0.1.18/issues/fix/41/CHANGELOG.md +21 -0
  40. defstream-0.1.18/issues/fix/41/IMPLEMENTS.md +31 -0
  41. defstream-0.1.18/issues/fix/41/PLAN.md +22 -0
  42. defstream-0.1.18/issues/fix/41/README.md +113 -0
  43. defstream-0.1.18/issues/fix/41/REQUIREMENTS.md +33 -0
  44. defstream-0.1.18/issues/fix/41/TASKS.md +24 -0
  45. defstream-0.1.18/issues/fix/41/implements/1793257519898.md +27 -0
  46. defstream-0.1.18/issues/fix/41/implements/1793257826069.md +33 -0
  47. defstream-0.1.18/issues/fix/41/tasks/1793256929057.md +9 -0
  48. defstream-0.1.18/issues/fix/41/tasks/1793256990072.md +26 -0
  49. defstream-0.1.18/issues/fix/41/tasks/1793257216492.md +30 -0
  50. defstream-0.1.18/issues/fix/41/tasks/1793257519899.md +33 -0
  51. defstream-0.1.18/issues/fix/41/tasks/1793257826068.md +42 -0
  52. defstream-0.1.18/issues/task/32/IMPLEMENTS.md +107 -0
  53. defstream-0.1.18/issues/task/32/ISSUE.md +105 -0
  54. defstream-0.1.18/issues/task/32/PLAN.md +164 -0
  55. defstream-0.1.18/issues/task/32/README.md +19 -0
  56. defstream-0.1.18/issues/task/32/REQUIREMENTS.md +168 -0
  57. defstream-0.1.18/issues/task/32/TASK.md +36 -0
  58. defstream-0.1.18/issues/task/34/CHANGELOG.md +3 -0
  59. defstream-0.1.18/issues/task/34/IMPLEMENTS.md +26 -0
  60. defstream-0.1.18/issues/task/34/PLAN.md +38 -0
  61. defstream-0.1.18/issues/task/34/README.md +51 -0
  62. defstream-0.1.18/issues/task/34/REQUIREMENTS.md +73 -0
  63. defstream-0.1.18/issues/task/36/CHANGELOG.md +5 -0
  64. defstream-0.1.18/issues/task/36/IMPLEMENTS.md +35 -0
  65. defstream-0.1.18/issues/task/36/PLAN.md +58 -0
  66. defstream-0.1.18/issues/task/36/README.md +49 -0
  67. defstream-0.1.18/issues/task/36/REQUIREMENTS.md +78 -0
  68. {defstream-0.1.16 → defstream-0.1.18}/samples/Broker/RabbitMQ/Sample.RPC.py +1 -1
  69. {defstream-0.1.16 → defstream-0.1.18}/samples/Broker/RabbitMQ/Sample.Stream.py +1 -1
  70. {defstream-0.1.16 → defstream-0.1.18}/samples/Broker/RabbitMQ/Sample.py +1 -1
  71. {defstream-0.1.16 → defstream-0.1.18}/setup.py +1 -1
  72. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Implements/RabbitMQ/Configuration.py +6 -5
  73. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Implements/RabbitMQ/Connection.py +54 -49
  74. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Implements/RabbitMQ/Consumer.py +10 -11
  75. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Implements/RabbitMQ/Event.py +1 -1
  76. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Implements/RabbitMQ/Exchange.py +9 -9
  77. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Implements/RabbitMQ/Queue.py +15 -13
  78. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Implements/RabbitMQ/Serializer.py +17 -3
  79. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Implements/RabbitMQ/Stream.py +10 -8
  80. {defstream-0.1.16 → defstream-0.1.18}/tests/test_protocol_contracts.py +4 -0
  81. {defstream-0.1.16 → defstream-0.1.18}/tests/test_rabbitmq_broker_methods.py +2 -0
  82. {defstream-0.1.16 → defstream-0.1.18}/tests/test_rabbitmq_logging.py +24 -10
  83. {defstream-0.1.16 → defstream-0.1.18}/tests/test_rabbitmq_priorities.py +2 -0
  84. {defstream-0.1.16 → defstream-0.1.18}/tests/test_rabbitmq_rpc.py +1 -1
  85. {defstream-0.1.16 → defstream-0.1.18}/tests/test_rabbitmq_rpc_integration.py +1 -1
  86. {defstream-0.1.16 → defstream-0.1.18}/tests/test_task_messages.py +6 -0
  87. {defstream-0.1.16 → defstream-0.1.18}/tests/test_task_priorities.py +2 -0
  88. {defstream-0.1.16 → defstream-0.1.18}/tests/test_worker_startup.py +4 -0
  89. defstream-0.1.16/DefStream.egg-info/PKG-INFO +0 -1152
  90. defstream-0.1.16/PKG-INFO +0 -1152
  91. defstream-0.1.16/README.en.md +0 -1157
  92. defstream-0.1.16/README.md +0 -1119
  93. defstream-0.1.16/tests/test_rabbitmq_release_workflow.py +0 -398
  94. defstream-0.1.16/tests/test_redis_release_workflow.py +0 -398
  95. defstream-0.1.16/tests/test_release_workflow.py +0 -469
  96. {defstream-0.1.16 → defstream-0.1.18}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  97. {defstream-0.1.16 → defstream-0.1.18}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  98. {defstream-0.1.16 → defstream-0.1.18}/.gitignore +0 -0
  99. {defstream-0.1.16 → defstream-0.1.18}/DefStream.egg-info/dependency_links.txt +0 -0
  100. {defstream-0.1.16 → defstream-0.1.18}/DefStream.egg-info/requires.txt +0 -0
  101. {defstream-0.1.16 → defstream-0.1.18}/DefStream.egg-info/top_level.txt +0 -0
  102. {defstream-0.1.16 → defstream-0.1.18}/LICENSE +0 -0
  103. {defstream-0.1.16 → defstream-0.1.18}/issues/bug/16/IMPLEMENTS.md +0 -0
  104. {defstream-0.1.16 → defstream-0.1.18}/issues/bug/16/ISSUE.md +0 -0
  105. {defstream-0.1.16 → defstream-0.1.18}/issues/bug/16/README.md +0 -0
  106. {defstream-0.1.16 → defstream-0.1.18}/issues/bug/16/REQUIREMENTS.md +0 -0
  107. {defstream-0.1.16 → defstream-0.1.18}/issues/feature/1/IMPLEMENTS.md +0 -0
  108. {defstream-0.1.16 → defstream-0.1.18}/issues/feature/1/README.md +0 -0
  109. {defstream-0.1.16 → defstream-0.1.18}/issues/feature/1/REQUIREMENTS.md +0 -0
  110. {defstream-0.1.16 → defstream-0.1.18}/issues/feature/1/TASK.md +0 -0
  111. {defstream-0.1.16 → defstream-0.1.18}/issues/feature/1/ci.refs.json +0 -0
  112. {defstream-0.1.16 → defstream-0.1.18}/issues/feature/8/IMPLEMENTS.md +0 -0
  113. {defstream-0.1.16 → defstream-0.1.18}/issues/feature/8/README.md +0 -0
  114. {defstream-0.1.16 → defstream-0.1.18}/issues/feature/8/REQUIREMENTS.md +0 -0
  115. {defstream-0.1.16 → defstream-0.1.18}/issues/feature/8/ci.refs.json +0 -0
  116. {defstream-0.1.16 → defstream-0.1.18}/issues/fix/10/IMPLEMENTS.md +0 -0
  117. {defstream-0.1.16 → defstream-0.1.18}/issues/fix/10/README.md +0 -0
  118. {defstream-0.1.16 → defstream-0.1.18}/issues/fix/10/REQUIREMENTS.md +0 -0
  119. {defstream-0.1.16 → defstream-0.1.18}/issues/fix/13/README.md +0 -0
  120. {defstream-0.1.16 → defstream-0.1.18}/issues/fix/21/IMPLEMENTS.md +0 -0
  121. {defstream-0.1.16 → defstream-0.1.18}/issues/fix/21/ISSUE.md +0 -0
  122. {defstream-0.1.16 → defstream-0.1.18}/issues/fix/21/README.md +0 -0
  123. {defstream-0.1.16 → defstream-0.1.18}/issues/fix/21/REQUIREMENTS.md +0 -0
  124. {defstream-0.1.16 → defstream-0.1.18}/issues/fix/24/IMPLEMENTS.md +0 -0
  125. {defstream-0.1.16 → defstream-0.1.18}/issues/fix/24/ISSUE.md +0 -0
  126. {defstream-0.1.16 → defstream-0.1.18}/issues/fix/24/README.md +0 -0
  127. {defstream-0.1.16 → defstream-0.1.18}/issues/fix/24/REQUIREMENTS.md +0 -0
  128. {defstream-0.1.16 → defstream-0.1.18}/issues/fix/25/IMPLEMENTS.md +0 -0
  129. {defstream-0.1.16 → defstream-0.1.18}/issues/fix/25/ISSUE.md +0 -0
  130. {defstream-0.1.16 → defstream-0.1.18}/issues/fix/25/README.md +0 -0
  131. {defstream-0.1.16 → defstream-0.1.18}/issues/fix/25/REQUIREMENTS.md +0 -0
  132. {defstream-0.1.16 → defstream-0.1.18}/issues/fix/25/TASK.md +0 -0
  133. {defstream-0.1.16 → defstream-0.1.18}/issues/fix/3/IMPLEMENTS.md +0 -0
  134. {defstream-0.1.16 → defstream-0.1.18}/issues/fix/3/README.md +0 -0
  135. {defstream-0.1.16 → defstream-0.1.18}/issues/fix/3/REQUIREMENTS.md +0 -0
  136. {defstream-0.1.16 → defstream-0.1.18}/issues/fix/3/ci.refs.json +0 -0
  137. {defstream-0.1.16 → defstream-0.1.18}/issues/fix/6/IMPLEMENTS.md +0 -0
  138. {defstream-0.1.16 → defstream-0.1.18}/issues/fix/6/README.md +0 -0
  139. {defstream-0.1.16 → defstream-0.1.18}/issues/fix/6/REQUIREMENTS.md +0 -0
  140. {defstream-0.1.16 → defstream-0.1.18}/issues/task/18/IMPLEMENTS.md +0 -0
  141. {defstream-0.1.16 → defstream-0.1.18}/issues/task/18/README.md +0 -0
  142. {defstream-0.1.16 → defstream-0.1.18}/issues/task/18/REQUIREMENTS.md +0 -0
  143. {defstream-0.1.16 → defstream-0.1.18}/samples/Broker/Redis/Sample.Stream.py +0 -0
  144. {defstream-0.1.16 → defstream-0.1.18}/samples/Broker/Redis/Sample.py +0 -0
  145. {defstream-0.1.16 → defstream-0.1.18}/samples/Broker/Sample.py +0 -0
  146. {defstream-0.1.16 → defstream-0.1.18}/samples/Worker/RabbitMQ/Client.py +0 -0
  147. {defstream-0.1.16 → defstream-0.1.18}/samples/Worker/RabbitMQ/Tasks.py +0 -0
  148. {defstream-0.1.16 → defstream-0.1.18}/samples/Worker/RabbitMQ/Worker.py +0 -0
  149. {defstream-0.1.16 → defstream-0.1.18}/samples/Worker/Redis/Sample.py +0 -0
  150. {defstream-0.1.16 → defstream-0.1.18}/samples/Worker/Sample.py +0 -0
  151. {defstream-0.1.16 → defstream-0.1.18}/setup.cfg +0 -0
  152. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Configuration.py +0 -0
  153. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Connection.py +0 -0
  154. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Consumer.py +0 -0
  155. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Errors.py +0 -0
  156. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Event.py +0 -0
  157. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Implements/RabbitMQ/Policies.py +0 -0
  158. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Implements/RabbitMQ/Subscription.py +0 -0
  159. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Implements/RabbitMQ/__init__.py +0 -0
  160. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Implements/Redis/Configuration.py +0 -0
  161. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Implements/Redis/Connection.py +0 -0
  162. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Implements/Redis/Consumer.py +0 -0
  163. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Implements/Redis/Event.py +0 -0
  164. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Implements/Redis/Queue.py +0 -0
  165. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Implements/Redis/Serializer.py +0 -0
  166. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Implements/Redis/Subscription.py +0 -0
  167. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Implements/Redis/__init__.py +0 -0
  168. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Implements/__init__.py +0 -0
  169. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Policies.py +0 -0
  170. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Priority.py +0 -0
  171. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/Protocol.py +0 -0
  172. {defstream-0.1.16 → defstream-0.1.18}/src/Broker/__init__.py +0 -0
  173. {defstream-0.1.16 → defstream-0.1.18}/src/Descriptor/DataObject.py +0 -0
  174. {defstream-0.1.16 → defstream-0.1.18}/src/Descriptor/Types.py +0 -0
  175. {defstream-0.1.16 → defstream-0.1.18}/src/Descriptor/Value.py +0 -0
  176. {defstream-0.1.16 → defstream-0.1.18}/src/Descriptor/__init__.py +0 -0
  177. {defstream-0.1.16 → defstream-0.1.18}/src/Inspector/Extension.py +0 -0
  178. {defstream-0.1.16 → defstream-0.1.18}/src/Inspector/Extensions/Console.html +0 -0
  179. {defstream-0.1.16 → defstream-0.1.18}/src/Inspector/Extensions/Console.py +0 -0
  180. {defstream-0.1.16 → defstream-0.1.18}/src/Inspector/Extensions/Metrics.py +0 -0
  181. {defstream-0.1.16 → defstream-0.1.18}/src/Inspector/Extensions/Ping.py +0 -0
  182. {defstream-0.1.16 → defstream-0.1.18}/src/Inspector/Extensions/Specifications.py +0 -0
  183. {defstream-0.1.16 → defstream-0.1.18}/src/Inspector/Extensions/Status.html +0 -0
  184. {defstream-0.1.16 → defstream-0.1.18}/src/Inspector/Extensions/Status.py +0 -0
  185. {defstream-0.1.16 → defstream-0.1.18}/src/Inspector/Extensions/__init__.py +0 -0
  186. {defstream-0.1.16 → defstream-0.1.18}/src/Inspector/Inspector.py +0 -0
  187. {defstream-0.1.16 → defstream-0.1.18}/src/Inspector/Response.py +0 -0
  188. {defstream-0.1.16 → defstream-0.1.18}/src/Inspector/__init__.py +0 -0
  189. {defstream-0.1.16 → defstream-0.1.18}/src/Validator/Pattern.py +0 -0
  190. {defstream-0.1.16 → defstream-0.1.18}/src/Validator/Patterns/Array.py +0 -0
  191. {defstream-0.1.16 → defstream-0.1.18}/src/Validator/Patterns/Common.py +0 -0
  192. {defstream-0.1.16 → defstream-0.1.18}/src/Validator/Patterns/Compare.py +0 -0
  193. {defstream-0.1.16 → defstream-0.1.18}/src/Validator/Patterns/Condition.py +0 -0
  194. {defstream-0.1.16 → defstream-0.1.18}/src/Validator/Patterns/DataObject.py +0 -0
  195. {defstream-0.1.16 → defstream-0.1.18}/src/Validator/Patterns/DateTime.py +0 -0
  196. {defstream-0.1.16 → defstream-0.1.18}/src/Validator/Patterns/Number.py +0 -0
  197. {defstream-0.1.16 → defstream-0.1.18}/src/Validator/Patterns/Object.py +0 -0
  198. {defstream-0.1.16 → defstream-0.1.18}/src/Validator/Patterns/Size.py +0 -0
  199. {defstream-0.1.16 → defstream-0.1.18}/src/Validator/Patterns/String.py +0 -0
  200. {defstream-0.1.16 → defstream-0.1.18}/src/Validator/Patterns/Type.py +0 -0
  201. {defstream-0.1.16 → defstream-0.1.18}/src/Validator/Patterns/__init__.py +0 -0
  202. {defstream-0.1.16 → defstream-0.1.18}/src/Validator/Validate.py +0 -0
  203. {defstream-0.1.16 → defstream-0.1.18}/src/Validator/Validator.py +0 -0
  204. {defstream-0.1.16 → defstream-0.1.18}/src/Validator/__init__.py +0 -0
  205. {defstream-0.1.16 → defstream-0.1.18}/src/Worker/Executor.py +0 -0
  206. {defstream-0.1.16 → defstream-0.1.18}/src/Worker/Message.py +0 -0
  207. {defstream-0.1.16 → defstream-0.1.18}/src/Worker/Pool.py +0 -0
  208. {defstream-0.1.16 → defstream-0.1.18}/src/Worker/Run.py +0 -0
  209. {defstream-0.1.16 → defstream-0.1.18}/src/Worker/Specification.py +0 -0
  210. {defstream-0.1.16 → defstream-0.1.18}/src/Worker/Startup.py +0 -0
  211. {defstream-0.1.16 → defstream-0.1.18}/src/Worker/Worker.py +0 -0
  212. {defstream-0.1.16 → defstream-0.1.18}/src/Worker/__init__.py +0 -0
  213. {defstream-0.1.16 → defstream-0.1.18}/src/__init__.py +0 -0
  214. {defstream-0.1.16 → defstream-0.1.18}/tests/test_broker_packaging.py +0 -0
  215. {defstream-0.1.16 → defstream-0.1.18}/tests/test_descriptor.py +0 -0
  216. {defstream-0.1.16 → defstream-0.1.18}/tests/test_inspector.py +0 -0
  217. {defstream-0.1.16 → defstream-0.1.18}/tests/test_inspector_console.py +0 -0
  218. {defstream-0.1.16 → defstream-0.1.18}/tests/test_inspector_logging.py +0 -0
  219. {defstream-0.1.16 → defstream-0.1.18}/tests/test_lifecycle_hooks.py +0 -0
  220. {defstream-0.1.16 → defstream-0.1.18}/tests/test_logging.py +0 -0
  221. {defstream-0.1.16 → defstream-0.1.18}/tests/test_pool_callbacks.py +0 -0
  222. {defstream-0.1.16 → defstream-0.1.18}/tests/test_process_signals.py +0 -0
  223. {defstream-0.1.16 → defstream-0.1.18}/tests/test_rabbitmq_integration.py +0 -0
  224. {defstream-0.1.16 → defstream-0.1.18}/tests/test_rabbitmq_worker.py +0 -0
  225. {defstream-0.1.16 → defstream-0.1.18}/tests/test_redis.py +0 -0
  226. {defstream-0.1.16 → defstream-0.1.18}/tests/test_redis_integration.py +0 -0
  227. {defstream-0.1.16 → defstream-0.1.18}/tests/test_redis_logging.py +0 -0
  228. {defstream-0.1.16 → defstream-0.1.18}/tests/test_runner_hooks.py +0 -0
  229. {defstream-0.1.16 → defstream-0.1.18}/tests/test_specifications.py +0 -0
  230. {defstream-0.1.16 → defstream-0.1.18}/tests/test_status.py +0 -0
  231. {defstream-0.1.16 → defstream-0.1.18}/tests/test_status_ui.cjs +0 -0
  232. {defstream-0.1.16 → defstream-0.1.18}/tests/test_validator_patterns.py +0 -0
  233. {defstream-0.1.16 → defstream-0.1.18}/tests/test_worker.py +0 -0
@@ -2,8 +2,6 @@ name: 기능 제안
2
2
  description: 추가하거나 개선할 기능을 제안합니다.
3
3
  labels:
4
4
  - feature
5
- projects:
6
- - yong5eon/7
7
5
  body:
8
6
  - type: markdown
9
7
  attributes:
@@ -2,8 +2,6 @@ name: 버그/오류 제보
2
2
  description: 예상과 다르게 동작하거나 오류가 발생하는 문제를 제보합니다.
3
3
  labels:
4
4
  - bug
5
- projects:
6
- - yong5eon/7
7
5
  body:
8
6
  - type: markdown
9
7
  attributes:
@@ -2,8 +2,6 @@ name: 변경 제안
2
2
  description: 일반 변경이나 핫픽스의 목적과 범위를 정리합니다.
3
3
  labels:
4
4
  - fix
5
- projects:
6
- - yong5eon/7
7
5
  body:
8
6
  - type: markdown
9
7
  attributes:
@@ -2,8 +2,6 @@ name: 작업 제안
2
2
  description: 리소스 변경, 문서화 등 소스 코드 변경이 아닌 작업을 정리합니다.
3
3
  labels:
4
4
  - task
5
- projects:
6
- - yong5eon/7
7
5
  body:
8
6
  - type: markdown
9
7
  attributes:
@@ -2,7 +2,6 @@ name: CI
2
2
 
3
3
  on:
4
4
  pull_request:
5
- branches: [master]
6
5
  push:
7
6
  branches: [master]
8
7
 
@@ -18,7 +17,7 @@ concurrency:
18
17
 
19
18
  jobs:
20
19
  changes:
21
- name: Plan release version
20
+ name: Prepare CI and master release metadata
22
21
  permissions:
23
22
  contents: read
24
23
  pull-requests: read
@@ -30,7 +29,6 @@ jobs:
30
29
  build: ${{ steps.changes.outputs.build }}
31
30
  new_version: ${{ steps.changes.outputs.new_version }}
32
31
  tag: ${{ steps.changes.outputs.tag }}
33
- test_required: ${{ steps.test_paths.outputs.required }}
34
32
  steps:
35
33
  - uses: actions/checkout@v7
36
34
  with:
@@ -40,49 +38,22 @@ jobs:
40
38
  uses: actions/setup-python@v7
41
39
  with:
42
40
  python-version: '3.13'
43
- - name: Detect test-relevant changes
44
- id: test_paths
45
- run: |
46
- python - <<'PY'
47
- from json import loads
48
- from os import environ
49
- from pathlib import Path
50
- from subprocess import check_output
51
-
52
- required = True
53
- if environ['GITHUB_EVENT_NAME'] == 'pull_request':
54
- event = loads(Path(environ['GITHUB_EVENT_PATH']).read_text(encoding='utf-8'))
55
- base = event['pull_request']['base']['sha']
56
- changed = check_output([
57
- 'git', 'diff', '--name-only', '--no-renames', '-z',
58
- f'{base}...{environ["GITHUB_SHA"]}', '--', 'samples/', 'src/', 'tests/', 'setup.py', '.github/workflows/ci.yml',
59
- ])
60
- required = bool(changed)
61
- with Path(environ['GITHUB_OUTPUT']).open('a', encoding='utf-8') as output:
62
- output.write(f'required={str(required).lower()}\n')
63
- print(f'Test-relevant changes: {required}')
64
- PY
65
41
  - name: Check complete push range and plan version
42
+ if: github.event_name == 'push' && github.ref == 'refs/heads/master'
66
43
  id: changes
67
44
  env:
68
45
  BEFORE: ${{ github.event.before }}
69
- RELEASE_PUSH: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
70
46
  run: |
71
47
  python - <<'PY'
72
- from json import loads
73
48
  from os import environ
74
49
  from pathlib import Path
75
50
  from re import fullmatch
76
51
  from subprocess import check_output
77
52
 
78
- release_push = environ['RELEASE_PUSH'] == 'true'
79
53
  series = environ['RELEASE_SERIES']
80
54
  if fullmatch(r'(0|[1-9]\d*)\.(0|[1-9]\d*)', series) is None:
81
55
  raise ValueError(f'Invalid RELEASE_SERIES: {series!r}')
82
56
  before = environ['BEFORE']
83
- if not release_push:
84
- event = loads(Path(environ['GITHUB_EVENT_PATH']).read_text(encoding='utf-8'))
85
- before = event['pull_request']['base']['sha']
86
57
  if not before:
87
58
  raise ValueError('Missing push base commit')
88
59
  first_push = set(before) == {'0'}
@@ -112,8 +83,6 @@ jobs:
112
83
  number = int(environ['GITHUB_RUN_NUMBER'])
113
84
  if number < 1:
114
85
  raise ValueError('Build number must be positive')
115
- if latest is None and not changed:
116
- raise ValueError('No release tag or source/packaging changes; tag the existing release before rebuilding')
117
86
  migrate = latest is not None and latest[5]
118
87
  new_version = bool(changed) or latest is None or migrate
119
88
  if new_version:
@@ -125,12 +94,12 @@ jobs:
125
94
  version = f'{series}.{patch}'
126
95
  print(f'Planned version: {version}, wheel build: {number}')
127
96
  with Path(environ['GITHUB_OUTPUT']).open('a', encoding='utf-8') as output:
128
- output.write(f'release={str(release_push).lower()}\nversion={version}\n')
97
+ output.write(f'release=true\nversion={version}\n')
129
98
  output.write(f'build={number}\nnew_version={str(new_version).lower()}\n')
130
99
  output.write(f'tag={version if new_version else release_tags[latest]}\n')
131
100
  PY
132
- - name: Validate PR branch changelog
133
- id: changelog
101
+ - name: Collect branch changelog for release
102
+ if: github.event_name == 'push' && github.ref == 'refs/heads/master'
134
103
  env:
135
104
  GH_TOKEN: ${{ github.token }}
136
105
  BEFORE: ${{ github.event.before }}
@@ -144,25 +113,20 @@ jobs:
144
113
  from subprocess import check_output
145
114
 
146
115
  head = environ['GITHUB_SHA']
147
- if environ['GITHUB_EVENT_NAME'] == 'pull_request':
148
- event = loads(Path(environ['GITHUB_EVENT_PATH']).read_text(encoding='utf-8'))
149
- branch = event['pull_request']['head']['ref']
150
- else:
151
- repository = environ['GITHUB_REPOSITORY']
152
- pages = loads(check_output([
153
- 'gh', 'api', '--paginate', '--slurp',
154
- f'repos/{repository}/commits/{head}/pulls?per_page=100',
155
- ]))
156
- pulls = [
157
- pull for page in pages for pull in page
158
- if pull['merged_at'] is not None
159
- and pull['merge_commit_sha'] == head
160
- and pull['base']['ref'] == 'master'
161
- and pull['base']['repo']['full_name'] == repository
162
- ]
163
- if len(pulls) > 1:
164
- raise ValueError('Multiple merged PRs found for the release commit')
165
- branch = pulls[0]['head']['ref'] if pulls else 'master'
116
+ repository = environ['GITHUB_REPOSITORY']
117
+ pages = loads(check_output([
118
+ 'gh', 'api', '--paginate', '--slurp',
119
+ f'repos/{repository}/commits/{head}/pulls?per_page=100',
120
+ ]))
121
+ pulls = [
122
+ pull for page in pages for pull in page
123
+ if pull['merged_at'] is not None
124
+ and pull['merge_commit_sha'] == head
125
+ and pull['base']['ref'] == 'master'
126
+ and pull['base']['repo']['full_name'] == repository
127
+ ]
128
+ if len(pulls) > 1:
129
+ raise ValueError('Multiple merged PRs found for the release commit')
166
130
  if environ['NEW_VERSION'] == 'false':
167
131
  tag = environ['RELEASE_TAG']
168
132
  release = loads(check_output([
@@ -172,7 +136,7 @@ jobs:
172
136
  raise ValueError(f'Existing release notes are missing or empty: {tag}')
173
137
  body = release['body'].encode('utf-8')
174
138
  print(f'Reusing release notes unchanged: {tag}')
175
- elif environ['GITHUB_EVENT_NAME'] == 'push' and not pulls:
139
+ elif not pulls:
176
140
  before = environ['BEFORE']
177
141
  if not before:
178
142
  raise ValueError('Missing push base commit')
@@ -181,7 +145,8 @@ jobs:
181
145
  body = '## master 직접 push\n\n'.encode('utf-8') + commits
182
146
  print('Direct master push: generating release notes from commits')
183
147
  else:
184
- path = f'issues/{branch}/README.md'
148
+ branch = pulls[0]['head']['ref']
149
+ path = f'issues/{branch}/CHANGELOG.md'
185
150
  entry = check_output(['git', 'ls-tree', head, '--', path]).decode().split()
186
151
  if not entry or entry[0] not in ('100644', '100755'):
187
152
  raise ValueError(f'Changelog must exist as a regular file: {path}')
@@ -192,10 +157,9 @@ jobs:
192
157
  notes = Path(environ['RUNNER_TEMP'], 'release-notes', 'README.md')
193
158
  notes.parent.mkdir(parents=True, exist_ok=True)
194
159
  notes.write_bytes(body)
195
- with Path(environ['GITHUB_OUTPUT']).open('a', encoding='utf-8') as output:
196
- output.write(f'branch={branch}\n')
197
160
  PY
198
161
  - name: Preserve customer release notes
162
+ if: github.event_name == 'push' && github.ref == 'refs/heads/master'
199
163
  uses: actions/upload-artifact@v7
200
164
  with:
201
165
  name: release-notes
@@ -207,7 +171,6 @@ jobs:
207
171
  test:
208
172
  name: Test Python ${{ matrix.python }}
209
173
  needs: changes
210
- if: needs.changes.outputs.test_required == 'true'
211
174
  runs-on: ubuntu-latest
212
175
  timeout-minutes: 25
213
176
  strategy:
@@ -384,7 +347,7 @@ jobs:
384
347
  run: node --test packages/DefStream/tests/test_status_ui.cjs
385
348
 
386
349
  - name: Preserve verified release distributions
387
- if: needs.changes.outputs.release == 'true' && matrix.python == '3.13'
350
+ if: github.event_name == 'push' && github.ref == 'refs/heads/master' && needs.changes.outputs.release == 'true' && matrix.python == '3.13'
388
351
  uses: actions/upload-artifact@v7
389
352
  with:
390
353
  name: distributions
@@ -0,0 +1,92 @@
1
+ Metadata-Version: 2.4
2
+ Name: DefStream
3
+ Version: 0.1.18
4
+ Summary: Synchronous message processing with pluggable broker adapters
5
+ Home-page: https://github.com/yong5eon/DefStream
6
+ Author: Heo Yongseon
7
+ Project-URL: Source, https://github.com/yong5eon/DefStream
8
+ Project-URL: Issues, https://github.com/yong5eon/DefStream/issues
9
+ Project-URL: Releases, https://github.com/yong5eon/DefStream/releases
10
+ Classifier: Programming Language :: Python :: 3.9
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Requires-Python: >=3.9
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Provides-Extra: rabbitmq
20
+ Requires-Dist: pika>=1.3.2; extra == "rabbitmq"
21
+ Provides-Extra: redis
22
+ Requires-Dist: redis>=5.1.1; extra == "redis"
23
+ Dynamic: author
24
+ Dynamic: classifier
25
+ Dynamic: description
26
+ Dynamic: description-content-type
27
+ Dynamic: home-page
28
+ Dynamic: license-file
29
+ Dynamic: project-url
30
+ Dynamic: provides-extra
31
+ Dynamic: requires-python
32
+ Dynamic: summary
33
+
34
+ # DefStream
35
+
36
+ Synchronous event/message processing with pluggable broker adapters
37
+
38
+ DefStream processes broker messages with ordinary Python task methods and can run them in thread or process pools. It requires Python 3.9 or later.
39
+
40
+ ## Installation
41
+
42
+ Install the client extra for the broker you use. A broker server must be available separately.
43
+
44
+ ```shell
45
+ python -m pip install "DefStream[RabbitMQ]"
46
+ ```
47
+
48
+ For Redis Streams, install `DefStream[Redis]`. To install both clients, use `DefStream[RabbitMQ,Redis]`. The plain `DefStream` installation includes neither broker client.
49
+
50
+ ## Quick start
51
+
52
+ The following worker listens to a local RabbitMQ server at `127.0.0.1:5672`. The example credentials are for local development only.
53
+
54
+ ```python
55
+ from signal import SIGINT, signal
56
+
57
+ from DefStream.Broker.Implements.RabbitMQ import Configuration, Connection, Reject, Subscription
58
+ from DefStream.Worker import Run, ThreadPool, Worker, WorkerSetup, declare
59
+
60
+
61
+ class Add(
62
+ Run,
63
+ parameters=Subscription(queue='example.add', error='example.add.error'),
64
+ on_error=Reject(),
65
+ ):
66
+ def run(self, a: int, b: int):
67
+ print(a + b)
68
+ return a + b
69
+
70
+
71
+ class Prepare(WorkerSetup):
72
+ def __call__(self, worker: Worker) -> None:
73
+ for task in worker.tasks:
74
+ declare(task=task, broker=worker.broker)
75
+
76
+
77
+ if __name__ == '__main__':
78
+ worker = Worker(
79
+ Connection(Configuration(host='127.0.0.1', port=5672, username='guest', password='guest')),
80
+ ThreadPool(4),
81
+ setups=Prepare(),
82
+ )
83
+ worker.add(Add)
84
+ signal(SIGINT, lambda *_: worker.stop())
85
+ worker.run()
86
+ ```
87
+
88
+ Run the script after starting RabbitMQ. The worker declares its task queue and waits for messages. Store production credentials outside source code.
89
+
90
+ ## License
91
+
92
+ See the `LICENSE` file included with the source distribution for the license terms.
@@ -2,6 +2,7 @@
2
2
  LICENSE
3
3
  README.en.md
4
4
  README.md
5
+ README.setup.md
5
6
  setup.py
6
7
  .github/PULL_REQUEST_TEMPLATE.md
7
8
  .github/ISSUE_TEMPLATE/01.feature.yml
@@ -15,6 +16,25 @@ DefStream.egg-info/SOURCES.txt
15
16
  DefStream.egg-info/dependency_links.txt
16
17
  DefStream.egg-info/requires.txt
17
18
  DefStream.egg-info/top_level.txt
19
+ docs/Contracts.en.md
20
+ docs/Contracts.md
21
+ docs/GettingStarted.en.md
22
+ docs/GettingStarted.md
23
+ docs/LifecycleHooks.en.md
24
+ docs/LifecycleHooks.md
25
+ docs/Operations.en.md
26
+ docs/Operations.md
27
+ docs/README.en.md
28
+ docs/README.md
29
+ docs/RabbitMQ.en.md
30
+ docs/RabbitMQ.md
31
+ docs/Redis.en.md
32
+ docs/Redis.md
33
+ docs/Tasks.en.md
34
+ docs/Tasks.md
35
+ instructions/CODE.instructions.md
36
+ instructions/DOCS.instructions.md
37
+ instructions/README.instructions.md
18
38
  issues/bug/16/IMPLEMENTS.md
19
39
  issues/bug/16/ISSUE.md
20
40
  issues/bug/16/README.md
@@ -45,16 +65,53 @@ issues/fix/25/ISSUE.md
45
65
  issues/fix/25/README.md
46
66
  issues/fix/25/REQUIREMENTS.md
47
67
  issues/fix/25/TASK.md
68
+ issues/fix/26/IMPLEMENTS.md
69
+ issues/fix/26/ISSUE.md
70
+ issues/fix/26/README.md
71
+ issues/fix/26/REQUIREMENTS.md
72
+ issues/fix/29/ISSUE.md
73
+ issues/fix/29/README.md
74
+ issues/fix/29/REQUIREMENTS.md
75
+ issues/fix/29/TASK.md
48
76
  issues/fix/3/IMPLEMENTS.md
49
77
  issues/fix/3/README.md
50
78
  issues/fix/3/REQUIREMENTS.md
51
79
  issues/fix/3/ci.refs.json
80
+ issues/fix/41/CHANGELOG.md
81
+ issues/fix/41/IMPLEMENTS.md
82
+ issues/fix/41/PLAN.md
83
+ issues/fix/41/README.md
84
+ issues/fix/41/REQUIREMENTS.md
85
+ issues/fix/41/TASKS.md
86
+ issues/fix/41/implements/1793257519898.md
87
+ issues/fix/41/implements/1793257826069.md
88
+ issues/fix/41/tasks/1793256929057.md
89
+ issues/fix/41/tasks/1793256990072.md
90
+ issues/fix/41/tasks/1793257216492.md
91
+ issues/fix/41/tasks/1793257519899.md
92
+ issues/fix/41/tasks/1793257826068.md
52
93
  issues/fix/6/IMPLEMENTS.md
53
94
  issues/fix/6/README.md
54
95
  issues/fix/6/REQUIREMENTS.md
55
96
  issues/task/18/IMPLEMENTS.md
56
97
  issues/task/18/README.md
57
98
  issues/task/18/REQUIREMENTS.md
99
+ issues/task/32/IMPLEMENTS.md
100
+ issues/task/32/ISSUE.md
101
+ issues/task/32/PLAN.md
102
+ issues/task/32/README.md
103
+ issues/task/32/REQUIREMENTS.md
104
+ issues/task/32/TASK.md
105
+ issues/task/34/CHANGELOG.md
106
+ issues/task/34/IMPLEMENTS.md
107
+ issues/task/34/PLAN.md
108
+ issues/task/34/README.md
109
+ issues/task/34/REQUIREMENTS.md
110
+ issues/task/36/CHANGELOG.md
111
+ issues/task/36/IMPLEMENTS.md
112
+ issues/task/36/PLAN.md
113
+ issues/task/36/README.md
114
+ issues/task/36/REQUIREMENTS.md
58
115
  samples/Broker/Sample.py
59
116
  samples/Broker/RabbitMQ/Sample.RPC.py
60
117
  samples/Broker/RabbitMQ/Sample.Stream.py
@@ -150,15 +207,12 @@ tests/test_rabbitmq_broker_methods.py
150
207
  tests/test_rabbitmq_integration.py
151
208
  tests/test_rabbitmq_logging.py
152
209
  tests/test_rabbitmq_priorities.py
153
- tests/test_rabbitmq_release_workflow.py
154
210
  tests/test_rabbitmq_rpc.py
155
211
  tests/test_rabbitmq_rpc_integration.py
156
212
  tests/test_rabbitmq_worker.py
157
213
  tests/test_redis.py
158
214
  tests/test_redis_integration.py
159
215
  tests/test_redis_logging.py
160
- tests/test_redis_release_workflow.py
161
- tests/test_release_workflow.py
162
216
  tests/test_runner_hooks.py
163
217
  tests/test_specifications.py
164
218
  tests/test_status.py
@@ -0,0 +1,92 @@
1
+ Metadata-Version: 2.4
2
+ Name: DefStream
3
+ Version: 0.1.18
4
+ Summary: Synchronous message processing with pluggable broker adapters
5
+ Home-page: https://github.com/yong5eon/DefStream
6
+ Author: Heo Yongseon
7
+ Project-URL: Source, https://github.com/yong5eon/DefStream
8
+ Project-URL: Issues, https://github.com/yong5eon/DefStream/issues
9
+ Project-URL: Releases, https://github.com/yong5eon/DefStream/releases
10
+ Classifier: Programming Language :: Python :: 3.9
11
+ Classifier: Programming Language :: Python :: 3.10
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Requires-Python: >=3.9
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Provides-Extra: rabbitmq
20
+ Requires-Dist: pika>=1.3.2; extra == "rabbitmq"
21
+ Provides-Extra: redis
22
+ Requires-Dist: redis>=5.1.1; extra == "redis"
23
+ Dynamic: author
24
+ Dynamic: classifier
25
+ Dynamic: description
26
+ Dynamic: description-content-type
27
+ Dynamic: home-page
28
+ Dynamic: license-file
29
+ Dynamic: project-url
30
+ Dynamic: provides-extra
31
+ Dynamic: requires-python
32
+ Dynamic: summary
33
+
34
+ # DefStream
35
+
36
+ Synchronous event/message processing with pluggable broker adapters
37
+
38
+ DefStream processes broker messages with ordinary Python task methods and can run them in thread or process pools. It requires Python 3.9 or later.
39
+
40
+ ## Installation
41
+
42
+ Install the client extra for the broker you use. A broker server must be available separately.
43
+
44
+ ```shell
45
+ python -m pip install "DefStream[RabbitMQ]"
46
+ ```
47
+
48
+ For Redis Streams, install `DefStream[Redis]`. To install both clients, use `DefStream[RabbitMQ,Redis]`. The plain `DefStream` installation includes neither broker client.
49
+
50
+ ## Quick start
51
+
52
+ The following worker listens to a local RabbitMQ server at `127.0.0.1:5672`. The example credentials are for local development only.
53
+
54
+ ```python
55
+ from signal import SIGINT, signal
56
+
57
+ from DefStream.Broker.Implements.RabbitMQ import Configuration, Connection, Reject, Subscription
58
+ from DefStream.Worker import Run, ThreadPool, Worker, WorkerSetup, declare
59
+
60
+
61
+ class Add(
62
+ Run,
63
+ parameters=Subscription(queue='example.add', error='example.add.error'),
64
+ on_error=Reject(),
65
+ ):
66
+ def run(self, a: int, b: int):
67
+ print(a + b)
68
+ return a + b
69
+
70
+
71
+ class Prepare(WorkerSetup):
72
+ def __call__(self, worker: Worker) -> None:
73
+ for task in worker.tasks:
74
+ declare(task=task, broker=worker.broker)
75
+
76
+
77
+ if __name__ == '__main__':
78
+ worker = Worker(
79
+ Connection(Configuration(host='127.0.0.1', port=5672, username='guest', password='guest')),
80
+ ThreadPool(4),
81
+ setups=Prepare(),
82
+ )
83
+ worker.add(Add)
84
+ signal(SIGINT, lambda *_: worker.stop())
85
+ worker.run()
86
+ ```
87
+
88
+ Run the script after starting RabbitMQ. The worker declares its task queue and waits for messages. Store production credentials outside source code.
89
+
90
+ ## License
91
+
92
+ See the `LICENSE` file included with the source distribution for the license terms.
@@ -0,0 +1,73 @@
1
+ # DefStream
2
+
3
+ Synchronous event/message processing with pluggable broker adapters
4
+
5
+ **Just def.**<br>
6
+ **Let workers do the work.**<br>
7
+ **You don't need to await this.**
8
+
9
+ [한국어](./README.md) | **English**
10
+
11
+ DefStream is a synchronous library for processing broker messages with ordinary Python methods. Configure task execution, acknowledgements, failure policies, and thread or process pools without `async` / `await`.
12
+
13
+ - RabbitMQ and Redis Streams broker adapters
14
+ - One-way task publishing and synchronous RabbitMQ RPC
15
+ - Request/reply contract validation, health checks, and operational Inspector tools
16
+
17
+ ## Requirements and installation
18
+
19
+ Requires Python 3.9 or later. Install the client extra for the broker you use, and provide the broker server separately.
20
+
21
+ ```shell
22
+ python -m pip install "DefStream[RabbitMQ]"
23
+ python -m pip install "DefStream[Redis]"
24
+ ```
25
+
26
+ To install both adapters, use `python -m pip install "DefStream[RabbitMQ,Redis]"`. To install the core without broker clients, use `python -m pip install DefStream`.
27
+
28
+ ## Quick start
29
+
30
+ This example uses a local RabbitMQ server at `127.0.0.1:5672`. The credentials are for local development only; use dedicated credentials in production.
31
+
32
+ ```python
33
+ from signal import SIGINT, signal
34
+
35
+ from DefStream.Broker.Implements.RabbitMQ import Configuration, Connection, Reject, Subscription
36
+ from DefStream.Worker import Run, ThreadPool, Worker, WorkerSetup, declare
37
+
38
+
39
+ class Add(
40
+ Run,
41
+ parameters=Subscription(queue='example.add', error='example.add.error'),
42
+ on_error=Reject(),
43
+ ):
44
+ def run(self, a: int, b: int):
45
+ print(a + b)
46
+ return a + b
47
+
48
+
49
+ class Prepare(WorkerSetup):
50
+ def __call__(self, worker: Worker) -> None:
51
+ for task in worker.tasks:
52
+ declare(task=task, broker=worker.broker)
53
+
54
+
55
+ if __name__ == '__main__':
56
+ worker = Worker(
57
+ Connection(Configuration(host='127.0.0.1', port=5672, username='guest', password='guest')),
58
+ ThreadPool(4),
59
+ setups=Prepare(),
60
+ )
61
+ worker.add(Add)
62
+ signal(SIGINT, lambda *_: worker.stop())
63
+ worker.run()
64
+ ```
65
+
66
+ The Worker waits for tasks on the `example.add` queue. See the [detailed guide](./docs/README.en.md) for publishing tasks, declaring queues, RPC, and broker-specific configuration.
67
+
68
+ ## Documentation and releases
69
+
70
+ - [Detailed guide (English)](./docs/README.en.md)
71
+ - [Releases and change history](https://github.com/yong5eon/DefStream/releases)
72
+
73
+ DefStream is licensed under GNU GPL v3. See the repository's `LICENSE` file for the terms.
@@ -0,0 +1,73 @@
1
+ # DefStream
2
+
3
+ Synchronous event/message processing with pluggable broker adapters
4
+
5
+ **Just def.**<br>
6
+ **Let workers do the work.**<br>
7
+ **You don't need to await this.**
8
+
9
+ **한국어** | [English](./README.en.md)
10
+
11
+ DefStream은 메시지 브로커에서 받은 작업을 일반 Python 메서드로 처리하는 동기식 라이브러리입니다. `async` / `await` 없이 작업 실행, ACK와 실패 정책, 스레드·프로세스 풀을 구성할 수 있습니다.
12
+
13
+ - RabbitMQ와 Redis Streams 브로커 어댑터
14
+ - 단방향 작업 발행과 RabbitMQ 동기 RPC
15
+ - 요청·응답 계약 검증, 상태 확인과 운영용 Inspector
16
+
17
+ ## 요구 사항 및 설치
18
+
19
+ Python 3.9 이상이 필요합니다. 사용할 브로커의 클라이언트 extra를 설치하고, 별도로 브로커 서버를 준비하세요.
20
+
21
+ ```shell
22
+ python -m pip install "DefStream[RabbitMQ]"
23
+ python -m pip install "DefStream[Redis]"
24
+ ```
25
+
26
+ 두 어댑터가 모두 필요하면 `python -m pip install "DefStream[RabbitMQ,Redis]"`를 사용하세요. 브로커 클라이언트 없이 코어만 설치하려면 `python -m pip install DefStream`을 사용합니다.
27
+
28
+ ## 빠르게 시작하기
29
+
30
+ 다음 예제는 로컬 RabbitMQ(`127.0.0.1:5672`)를 사용합니다. 사용자 이름과 암호는 로컬 개발용 예시이며 운영 환경에서는 전용 자격 증명을 사용하세요.
31
+
32
+ ```python
33
+ from signal import SIGINT, signal
34
+
35
+ from DefStream.Broker.Implements.RabbitMQ import Configuration, Connection, Reject, Subscription
36
+ from DefStream.Worker import Run, ThreadPool, Worker, WorkerSetup, declare
37
+
38
+
39
+ class Add(
40
+ Run,
41
+ parameters=Subscription(queue='example.add', error='example.add.error'),
42
+ on_error=Reject(),
43
+ ):
44
+ def run(self, a: int, b: int):
45
+ print(a + b)
46
+ return a + b
47
+
48
+
49
+ class Prepare(WorkerSetup):
50
+ def __call__(self, worker: Worker) -> None:
51
+ for task in worker.tasks:
52
+ declare(task=task, broker=worker.broker)
53
+
54
+
55
+ if __name__ == '__main__':
56
+ worker = Worker(
57
+ Connection(Configuration(host='127.0.0.1', port=5672, username='guest', password='guest')),
58
+ ThreadPool(4),
59
+ setups=Prepare(),
60
+ )
61
+ worker.add(Add)
62
+ signal(SIGINT, lambda *_: worker.stop())
63
+ worker.run()
64
+ ```
65
+
66
+ Worker는 `example.add` 큐에서 작업을 기다립니다. 작업 발행, 큐 선언, RPC 및 브로커별 설정은 [상세 매뉴얼](./docs/README.md)에서 확인하세요.
67
+
68
+ ## 문서와 릴리즈
69
+
70
+ - [상세 매뉴얼 (한국어)](./docs/README.md)
71
+ - [릴리즈와 변경 내역](https://github.com/yong5eon/DefStream/releases)
72
+
73
+ DefStream은 GNU GPL v3 라이선스를 사용합니다. 자세한 조건은 저장소의 `LICENSE` 파일을 확인하세요.