DefStream 0.1.17__tar.gz → 0.1.19__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.
- {defstream-0.1.17 → defstream-0.1.19}/.github/ISSUE_TEMPLATE/01.feature.yml +0 -2
- {defstream-0.1.17 → defstream-0.1.19}/.github/ISSUE_TEMPLATE/02.bug.yml +0 -2
- {defstream-0.1.17 → defstream-0.1.19}/.github/ISSUE_TEMPLATE/03.fix.yml +0 -2
- {defstream-0.1.17 → defstream-0.1.19}/.github/ISSUE_TEMPLATE/04.task.yml +0 -2
- {defstream-0.1.17 → defstream-0.1.19}/.github/workflows/ci.yml +24 -61
- defstream-0.1.19/DefStream.egg-info/PKG-INFO +92 -0
- {defstream-0.1.17 → defstream-0.1.19}/DefStream.egg-info/SOURCES.txt +67 -8
- defstream-0.1.19/PKG-INFO +92 -0
- defstream-0.1.19/README.en.md +73 -0
- defstream-0.1.19/README.md +73 -0
- defstream-0.1.19/README.setup.md +59 -0
- defstream-0.1.19/docs/Contracts.en.md +175 -0
- defstream-0.1.19/docs/Contracts.md +168 -0
- defstream-0.1.19/docs/GettingStarted.en.md +191 -0
- defstream-0.1.19/docs/GettingStarted.md +186 -0
- defstream-0.1.19/docs/LifecycleHooks.en.md +214 -0
- defstream-0.1.19/docs/LifecycleHooks.md +210 -0
- defstream-0.1.19/docs/Operations.en.md +189 -0
- defstream-0.1.19/docs/Operations.md +180 -0
- defstream-0.1.19/docs/README.en.md +38 -0
- defstream-0.1.19/docs/README.md +38 -0
- defstream-0.1.19/docs/RabbitMQ.en.md +297 -0
- defstream-0.1.19/docs/RabbitMQ.md +286 -0
- defstream-0.1.19/docs/Redis.en.md +235 -0
- defstream-0.1.19/docs/Redis.md +230 -0
- defstream-0.1.19/docs/Tasks.en.md +174 -0
- defstream-0.1.19/docs/Tasks.md +172 -0
- defstream-0.1.19/instructions/CODE.instructions.md +32 -0
- defstream-0.1.19/instructions/DOCS.instructions.md +55 -0
- defstream-0.1.19/instructions/README.instructions.md +36 -0
- defstream-0.1.19/issues/fix/29/ISSUE.md +13 -0
- defstream-0.1.19/issues/fix/29/README.md +5 -0
- defstream-0.1.19/issues/fix/29/REQUIREMENTS.md +48 -0
- defstream-0.1.19/issues/fix/29/TASK.md +26 -0
- defstream-0.1.19/issues/fix/41/CHANGELOG.md +21 -0
- defstream-0.1.19/issues/fix/41/IMPLEMENTS.md +31 -0
- defstream-0.1.19/issues/fix/41/PLAN.md +22 -0
- defstream-0.1.19/issues/fix/41/README.md +113 -0
- defstream-0.1.19/issues/fix/41/REQUIREMENTS.md +33 -0
- defstream-0.1.19/issues/fix/41/TASKS.md +24 -0
- defstream-0.1.19/issues/fix/41/implements/1793257519898.md +27 -0
- defstream-0.1.19/issues/fix/41/implements/1793257826069.md +33 -0
- defstream-0.1.19/issues/fix/41/tasks/1793256929057.md +9 -0
- defstream-0.1.19/issues/fix/41/tasks/1793256990072.md +26 -0
- defstream-0.1.19/issues/fix/41/tasks/1793257216492.md +30 -0
- defstream-0.1.19/issues/fix/41/tasks/1793257519899.md +33 -0
- defstream-0.1.19/issues/fix/41/tasks/1793257826068.md +42 -0
- defstream-0.1.19/issues/fix/43/CHANGELOG.md +5 -0
- defstream-0.1.19/issues/fix/43/IMPLEMENTS.md +16 -0
- defstream-0.1.19/issues/fix/43/PLAN.md +67 -0
- defstream-0.1.19/issues/fix/43/README.md +35 -0
- defstream-0.1.19/issues/fix/43/REQUIREMENTS.md +59 -0
- defstream-0.1.19/issues/fix/43/TASKS.md +3 -0
- defstream-0.1.19/issues/fix/43/implements/1793260818660.md +7 -0
- defstream-0.1.19/issues/fix/43/implements/1793261447018.md +7 -0
- defstream-0.1.19/issues/fix/43/tasks/1793260818661.md +14 -0
- defstream-0.1.19/issues/fix/43/tasks/1793261447019.md +7 -0
- defstream-0.1.19/issues/fix/43/tasks/1793262314955.md +7 -0
- defstream-0.1.19/issues/task/32/IMPLEMENTS.md +107 -0
- defstream-0.1.19/issues/task/32/ISSUE.md +105 -0
- defstream-0.1.19/issues/task/32/PLAN.md +164 -0
- defstream-0.1.19/issues/task/32/README.md +19 -0
- defstream-0.1.19/issues/task/32/REQUIREMENTS.md +168 -0
- defstream-0.1.19/issues/task/32/TASK.md +36 -0
- defstream-0.1.19/issues/task/34/CHANGELOG.md +3 -0
- defstream-0.1.19/issues/task/34/IMPLEMENTS.md +26 -0
- defstream-0.1.19/issues/task/34/PLAN.md +38 -0
- defstream-0.1.19/issues/task/34/README.md +51 -0
- defstream-0.1.19/issues/task/34/REQUIREMENTS.md +73 -0
- defstream-0.1.19/issues/task/36/CHANGELOG.md +5 -0
- defstream-0.1.19/issues/task/36/IMPLEMENTS.md +35 -0
- defstream-0.1.19/issues/task/36/PLAN.md +58 -0
- defstream-0.1.19/issues/task/36/README.md +49 -0
- defstream-0.1.19/issues/task/36/REQUIREMENTS.md +78 -0
- {defstream-0.1.17 → defstream-0.1.19}/samples/Broker/RabbitMQ/Sample.RPC.py +6 -3
- {defstream-0.1.17 → defstream-0.1.19}/samples/Broker/RabbitMQ/Sample.Stream.py +1 -1
- {defstream-0.1.17 → defstream-0.1.19}/samples/Broker/RabbitMQ/Sample.py +11 -7
- {defstream-0.1.17 → defstream-0.1.19}/samples/Broker/Redis/Sample.Stream.py +1 -1
- {defstream-0.1.17 → defstream-0.1.19}/samples/Broker/Redis/Sample.py +1 -1
- {defstream-0.1.17 → defstream-0.1.19}/samples/Broker/Sample.py +6 -3
- {defstream-0.1.17 → defstream-0.1.19}/samples/Worker/RabbitMQ/Tasks.py +6 -2
- {defstream-0.1.17 → defstream-0.1.19}/samples/Worker/RabbitMQ/Worker.py +3 -3
- {defstream-0.1.17 → defstream-0.1.19}/samples/Worker/Redis/Sample.py +6 -4
- {defstream-0.1.17 → defstream-0.1.19}/samples/Worker/Sample.py +4 -3
- {defstream-0.1.17 → defstream-0.1.19}/setup.py +1 -1
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Configuration.py +1 -2
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Consumer.py +3 -3
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Event.py +2 -2
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Implements/RabbitMQ/Configuration.py +6 -5
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Implements/RabbitMQ/Connection.py +54 -49
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Implements/RabbitMQ/Consumer.py +16 -15
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Implements/RabbitMQ/Event.py +20 -1
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Implements/RabbitMQ/Exchange.py +9 -10
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Implements/RabbitMQ/Queue.py +15 -13
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Implements/RabbitMQ/Serializer.py +17 -3
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Implements/RabbitMQ/Stream.py +11 -9
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Implements/RabbitMQ/__init__.py +2 -4
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Implements/Redis/Connection.py +1 -1
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Implements/Redis/Consumer.py +8 -4
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Implements/Redis/Event.py +23 -2
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Implements/Redis/Queue.py +4 -4
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Implements/Redis/Subscription.py +1 -1
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Implements/Redis/__init__.py +6 -6
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Protocol.py +2 -2
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/__init__.py +2 -8
- {defstream-0.1.17 → defstream-0.1.19}/src/Inspector/Extensions/Metrics.py +1 -1
- {defstream-0.1.17 → defstream-0.1.19}/src/Inspector/Extensions/Ping.py +1 -1
- defstream-0.1.17/src/Inspector/Extensions/Console.html → defstream-0.1.19/src/Inspector/Extensions/Play.html +4 -4
- defstream-0.1.17/src/Inspector/Extensions/Console.py → defstream-0.1.19/src/Inspector/Extensions/Play.py +29 -29
- {defstream-0.1.17 → defstream-0.1.19}/src/Inspector/Extensions/Specifications.py +1 -1
- {defstream-0.1.17 → defstream-0.1.19}/src/Inspector/Extensions/Status.py +1 -1
- {defstream-0.1.17 → defstream-0.1.19}/src/Inspector/Extensions/__init__.py +2 -2
- {defstream-0.1.17 → defstream-0.1.19}/src/Inspector/Inspector.py +12 -5
- {defstream-0.1.17 → defstream-0.1.19}/src/Validator/Patterns/DataObject.py +18 -10
- {defstream-0.1.17 → defstream-0.1.19}/src/Validator/Patterns/Object.py +18 -10
- {defstream-0.1.17 → defstream-0.1.19}/src/Validator/Patterns/String.py +8 -1
- {defstream-0.1.17 → defstream-0.1.19}/src/Validator/Patterns/Type.py +56 -51
- {defstream-0.1.17 → defstream-0.1.19}/src/Worker/Executor.py +1 -1
- {defstream-0.1.17 → defstream-0.1.19}/src/Worker/Pool.py +3 -3
- {defstream-0.1.17 → defstream-0.1.19}/src/Worker/Run.py +5 -5
- {defstream-0.1.17 → defstream-0.1.19}/src/Worker/Worker.py +1 -1
- defstream-0.1.19/tests/_support.py +48 -0
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_broker_packaging.py +29 -2
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_inspector.py +63 -36
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_inspector_logging.py +39 -19
- defstream-0.1.17/tests/test_inspector_console.py → defstream-0.1.19/tests/test_inspector_play.py +65 -52
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_lifecycle_hooks.py +25 -14
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_logging.py +31 -23
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_protocol_contracts.py +48 -28
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_rabbitmq_broker_methods.py +2 -0
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_rabbitmq_integration.py +8 -7
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_rabbitmq_logging.py +35 -15
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_rabbitmq_priorities.py +2 -0
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_rabbitmq_rpc.py +11 -8
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_rabbitmq_rpc_integration.py +4 -3
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_rabbitmq_worker.py +5 -2
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_redis.py +8 -0
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_redis_integration.py +12 -9
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_redis_logging.py +30 -7
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_runner_hooks.py +1 -1
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_specifications.py +59 -34
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_task_messages.py +28 -12
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_task_priorities.py +2 -0
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_validator_patterns.py +15 -1
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_worker.py +18 -12
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_worker_startup.py +22 -11
- defstream-0.1.17/DefStream.egg-info/PKG-INFO +0 -1174
- defstream-0.1.17/PKG-INFO +0 -1174
- defstream-0.1.17/README.en.md +0 -1159
- defstream-0.1.17/README.md +0 -1121
- defstream-0.1.17/README.setup.md +0 -1141
- defstream-0.1.17/src/Broker/Implements/RabbitMQ/Policies.py +0 -9
- defstream-0.1.17/src/Broker/Policies.py +0 -25
- defstream-0.1.17/tests/test_rabbitmq_release_workflow.py +0 -398
- defstream-0.1.17/tests/test_redis_release_workflow.py +0 -398
- defstream-0.1.17/tests/test_release_workflow.py +0 -469
- {defstream-0.1.17 → defstream-0.1.19}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/.gitignore +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/DefStream.egg-info/dependency_links.txt +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/DefStream.egg-info/requires.txt +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/DefStream.egg-info/top_level.txt +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/LICENSE +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/bug/16/IMPLEMENTS.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/bug/16/ISSUE.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/bug/16/README.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/bug/16/REQUIREMENTS.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/feature/1/IMPLEMENTS.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/feature/1/README.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/feature/1/REQUIREMENTS.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/feature/1/TASK.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/feature/1/ci.refs.json +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/feature/8/IMPLEMENTS.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/feature/8/README.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/feature/8/REQUIREMENTS.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/feature/8/ci.refs.json +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/10/IMPLEMENTS.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/10/README.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/10/REQUIREMENTS.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/13/README.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/21/IMPLEMENTS.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/21/ISSUE.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/21/README.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/21/REQUIREMENTS.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/24/IMPLEMENTS.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/24/ISSUE.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/24/README.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/24/REQUIREMENTS.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/25/IMPLEMENTS.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/25/ISSUE.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/25/README.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/25/REQUIREMENTS.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/25/TASK.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/26/IMPLEMENTS.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/26/ISSUE.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/26/README.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/26/REQUIREMENTS.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/3/IMPLEMENTS.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/3/README.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/3/REQUIREMENTS.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/3/ci.refs.json +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/6/IMPLEMENTS.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/6/README.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/fix/6/REQUIREMENTS.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/task/18/IMPLEMENTS.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/task/18/README.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/issues/task/18/REQUIREMENTS.md +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/samples/Worker/RabbitMQ/Client.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/setup.cfg +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Connection.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Errors.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Implements/RabbitMQ/Subscription.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Implements/Redis/Configuration.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Implements/Redis/Serializer.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Implements/__init__.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Broker/Priority.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Descriptor/DataObject.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Descriptor/Types.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Descriptor/Value.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Descriptor/__init__.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Inspector/Extension.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Inspector/Extensions/Status.html +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Inspector/Response.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Inspector/__init__.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Validator/Pattern.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Validator/Patterns/Array.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Validator/Patterns/Common.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Validator/Patterns/Compare.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Validator/Patterns/Condition.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Validator/Patterns/DateTime.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Validator/Patterns/Number.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Validator/Patterns/Size.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Validator/Patterns/__init__.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Validator/Validate.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Validator/Validator.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Validator/__init__.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Worker/Message.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Worker/Specification.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Worker/Startup.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/Worker/__init__.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/src/__init__.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_descriptor.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_pool_callbacks.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_process_signals.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_status.py +0 -0
- {defstream-0.1.17 → defstream-0.1.19}/tests/test_status_ui.cjs +0 -0
|
@@ -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:
|
|
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=
|
|
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:
|
|
133
|
-
|
|
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
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
]
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
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
|
|
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
|
-
|
|
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.19
|
|
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.
|
|
@@ -16,6 +16,25 @@ DefStream.egg-info/SOURCES.txt
|
|
|
16
16
|
DefStream.egg-info/dependency_links.txt
|
|
17
17
|
DefStream.egg-info/requires.txt
|
|
18
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
|
|
19
38
|
issues/bug/16/IMPLEMENTS.md
|
|
20
39
|
issues/bug/16/ISSUE.md
|
|
21
40
|
issues/bug/16/README.md
|
|
@@ -50,16 +69,60 @@ issues/fix/26/IMPLEMENTS.md
|
|
|
50
69
|
issues/fix/26/ISSUE.md
|
|
51
70
|
issues/fix/26/README.md
|
|
52
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
|
|
53
76
|
issues/fix/3/IMPLEMENTS.md
|
|
54
77
|
issues/fix/3/README.md
|
|
55
78
|
issues/fix/3/REQUIREMENTS.md
|
|
56
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
|
|
93
|
+
issues/fix/43/CHANGELOG.md
|
|
94
|
+
issues/fix/43/IMPLEMENTS.md
|
|
95
|
+
issues/fix/43/PLAN.md
|
|
96
|
+
issues/fix/43/README.md
|
|
97
|
+
issues/fix/43/REQUIREMENTS.md
|
|
98
|
+
issues/fix/43/TASKS.md
|
|
99
|
+
issues/fix/43/implements/1793260818660.md
|
|
100
|
+
issues/fix/43/implements/1793261447018.md
|
|
101
|
+
issues/fix/43/tasks/1793260818661.md
|
|
102
|
+
issues/fix/43/tasks/1793261447019.md
|
|
103
|
+
issues/fix/43/tasks/1793262314955.md
|
|
57
104
|
issues/fix/6/IMPLEMENTS.md
|
|
58
105
|
issues/fix/6/README.md
|
|
59
106
|
issues/fix/6/REQUIREMENTS.md
|
|
60
107
|
issues/task/18/IMPLEMENTS.md
|
|
61
108
|
issues/task/18/README.md
|
|
62
109
|
issues/task/18/REQUIREMENTS.md
|
|
110
|
+
issues/task/32/IMPLEMENTS.md
|
|
111
|
+
issues/task/32/ISSUE.md
|
|
112
|
+
issues/task/32/PLAN.md
|
|
113
|
+
issues/task/32/README.md
|
|
114
|
+
issues/task/32/REQUIREMENTS.md
|
|
115
|
+
issues/task/32/TASK.md
|
|
116
|
+
issues/task/34/CHANGELOG.md
|
|
117
|
+
issues/task/34/IMPLEMENTS.md
|
|
118
|
+
issues/task/34/PLAN.md
|
|
119
|
+
issues/task/34/README.md
|
|
120
|
+
issues/task/34/REQUIREMENTS.md
|
|
121
|
+
issues/task/36/CHANGELOG.md
|
|
122
|
+
issues/task/36/IMPLEMENTS.md
|
|
123
|
+
issues/task/36/PLAN.md
|
|
124
|
+
issues/task/36/README.md
|
|
125
|
+
issues/task/36/REQUIREMENTS.md
|
|
63
126
|
samples/Broker/Sample.py
|
|
64
127
|
samples/Broker/RabbitMQ/Sample.RPC.py
|
|
65
128
|
samples/Broker/RabbitMQ/Sample.Stream.py
|
|
@@ -77,7 +140,6 @@ src/Broker/Connection.py
|
|
|
77
140
|
src/Broker/Consumer.py
|
|
78
141
|
src/Broker/Errors.py
|
|
79
142
|
src/Broker/Event.py
|
|
80
|
-
src/Broker/Policies.py
|
|
81
143
|
src/Broker/Priority.py
|
|
82
144
|
src/Broker/Protocol.py
|
|
83
145
|
src/Broker/__init__.py
|
|
@@ -87,7 +149,6 @@ src/Broker/Implements/RabbitMQ/Connection.py
|
|
|
87
149
|
src/Broker/Implements/RabbitMQ/Consumer.py
|
|
88
150
|
src/Broker/Implements/RabbitMQ/Event.py
|
|
89
151
|
src/Broker/Implements/RabbitMQ/Exchange.py
|
|
90
|
-
src/Broker/Implements/RabbitMQ/Policies.py
|
|
91
152
|
src/Broker/Implements/RabbitMQ/Queue.py
|
|
92
153
|
src/Broker/Implements/RabbitMQ/Serializer.py
|
|
93
154
|
src/Broker/Implements/RabbitMQ/Stream.py
|
|
@@ -109,10 +170,10 @@ src/Inspector/Extension.py
|
|
|
109
170
|
src/Inspector/Inspector.py
|
|
110
171
|
src/Inspector/Response.py
|
|
111
172
|
src/Inspector/__init__.py
|
|
112
|
-
src/Inspector/Extensions/Console.html
|
|
113
|
-
src/Inspector/Extensions/Console.py
|
|
114
173
|
src/Inspector/Extensions/Metrics.py
|
|
115
174
|
src/Inspector/Extensions/Ping.py
|
|
175
|
+
src/Inspector/Extensions/Play.html
|
|
176
|
+
src/Inspector/Extensions/Play.py
|
|
116
177
|
src/Inspector/Extensions/Specifications.py
|
|
117
178
|
src/Inspector/Extensions/Status.html
|
|
118
179
|
src/Inspector/Extensions/Status.py
|
|
@@ -141,11 +202,12 @@ src/Worker/Specification.py
|
|
|
141
202
|
src/Worker/Startup.py
|
|
142
203
|
src/Worker/Worker.py
|
|
143
204
|
src/Worker/__init__.py
|
|
205
|
+
tests/_support.py
|
|
144
206
|
tests/test_broker_packaging.py
|
|
145
207
|
tests/test_descriptor.py
|
|
146
208
|
tests/test_inspector.py
|
|
147
|
-
tests/test_inspector_console.py
|
|
148
209
|
tests/test_inspector_logging.py
|
|
210
|
+
tests/test_inspector_play.py
|
|
149
211
|
tests/test_lifecycle_hooks.py
|
|
150
212
|
tests/test_logging.py
|
|
151
213
|
tests/test_pool_callbacks.py
|
|
@@ -155,15 +217,12 @@ tests/test_rabbitmq_broker_methods.py
|
|
|
155
217
|
tests/test_rabbitmq_integration.py
|
|
156
218
|
tests/test_rabbitmq_logging.py
|
|
157
219
|
tests/test_rabbitmq_priorities.py
|
|
158
|
-
tests/test_rabbitmq_release_workflow.py
|
|
159
220
|
tests/test_rabbitmq_rpc.py
|
|
160
221
|
tests/test_rabbitmq_rpc_integration.py
|
|
161
222
|
tests/test_rabbitmq_worker.py
|
|
162
223
|
tests/test_redis.py
|
|
163
224
|
tests/test_redis_integration.py
|
|
164
225
|
tests/test_redis_logging.py
|
|
165
|
-
tests/test_redis_release_workflow.py
|
|
166
|
-
tests/test_release_workflow.py
|
|
167
226
|
tests/test_runner_hooks.py
|
|
168
227
|
tests/test_specifications.py
|
|
169
228
|
tests/test_status.py
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: DefStream
|
|
3
|
+
Version: 0.1.19
|
|
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.
|