dex-python-sdk 0.1.11__tar.gz → 0.2.1__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 (61) hide show
  1. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/PKG-INFO +11 -10
  2. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/README.md +10 -9
  3. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/_worker_dispatcher.py +7 -9
  4. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/async_client.py +4 -3
  5. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/client.py +4 -3
  6. dex_python_sdk-0.2.1/dex/dexpb/dex_pb2.py +443 -0
  7. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/dexpb/dex_pb2.pyi +12 -8
  8. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/flow.py +19 -3
  9. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/flow_config.py +3 -3
  10. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/flow_options.py +0 -2
  11. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/step.py +15 -15
  12. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/pyproject.toml +1 -1
  13. dex_python_sdk-0.1.11/dex/dexpb/dex_pb2.py +0 -441
  14. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/LEGACY_NOTICES.md +0 -0
  15. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/LICENSE +0 -0
  16. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/__init__.py +0 -0
  17. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/_async_value_hydrator.py +0 -0
  18. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/_async_worker_dispatcher.py +0 -0
  19. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/_async_worker_service.py +0 -0
  20. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/_grpc_errors.py +0 -0
  21. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/_invocation_context.py +0 -0
  22. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/_native.pyi +0 -0
  23. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/_utils.py +0 -0
  24. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/_value_hydrator.py +0 -0
  25. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/_value_mapper.py +0 -0
  26. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/_worker_service.py +0 -0
  27. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/async_worker.py +0 -0
  28. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/attribute.py +0 -0
  29. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/blob_cache.py +0 -0
  30. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/channel.py +0 -0
  31. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/client_options.py +0 -0
  32. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/codec.py +0 -0
  33. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/condition.py +0 -0
  34. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/context.py +0 -0
  35. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/dexpb/__init__.py +0 -0
  36. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/dexpb/dex_pb2_grpc.py +0 -0
  37. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/flow_info.py +0 -0
  38. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/flow_result.py +0 -0
  39. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/py.typed +0 -0
  40. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/runtime_errors.py +0 -0
  41. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/step_execution.py +0 -0
  42. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/subflow.py +0 -0
  43. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/timer.py +0 -0
  44. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/wait.py +0 -0
  45. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/worker.py +0 -0
  46. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/dex/worker_options.py +0 -0
  47. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/sdk-rust/Cargo.lock +0 -0
  48. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/sdk-rust/Cargo.toml +0 -0
  49. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/sdk-rust/crates/dex-blob-cache/Cargo.toml +0 -0
  50. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/sdk-rust/crates/dex-blob-cache/LICENSE +0 -0
  51. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/sdk-rust/crates/dex-blob-cache/src/config.rs +0 -0
  52. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/sdk-rust/crates/dex-blob-cache/src/entry.rs +0 -0
  53. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/sdk-rust/crates/dex-blob-cache/src/error.rs +0 -0
  54. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/sdk-rust/crates/dex-blob-cache/src/format.rs +0 -0
  55. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/sdk-rust/crates/dex-blob-cache/src/lib.rs +0 -0
  56. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/sdk-rust/crates/dex-blob-cache/src/policy.rs +0 -0
  57. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/sdk-rust/crates/dex-blob-cache/src/store.rs +0 -0
  58. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/sdk-rust/crates/dex-blob-cache/tests/blob_cache_integration.rs +0 -0
  59. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/sdk-rust/crates/dex-blob-cache-python/Cargo.toml +0 -0
  60. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/sdk-rust/crates/dex-blob-cache-python/LICENSE +0 -0
  61. {dex_python_sdk-0.1.11 → dex_python_sdk-0.2.1}/sdk-rust/crates/dex-blob-cache-python/src/lib.rs +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dex-python-sdk
3
- Version: 0.1.11
3
+ Version: 0.2.1
4
4
  Requires-Dist: grpcio>=1.83.0
5
5
  Requires-Dist: grpcio-status>=1.83.0
6
6
  Requires-Dist: protobuf>=7.35.1
@@ -96,13 +96,14 @@ Flow configuration:
96
96
 
97
97
  ```python
98
98
  email = dex.Attribute("customer-email", str, sync_to_attribute_store=True)
99
- config = dex.FlowConfig(attribute_store_name="profiles")
99
+ config = dex.FlowConfig(attribute_store_names=["profiles", "audit"])
100
100
  ```
101
101
 
102
- The Store is an asynchronous latest-state projection. Deletion writes SQL
103
- `NULL`, and projection failures do not roll back Flow Attributes. `None`
104
- preserves the current target; an explicit empty string disables future
105
- synchronization while retaining protocol presence.
102
+ Stores are asynchronous latest-state projections. Every enabled Attribute write
103
+ is sent to every selected Store. Deletion writes SQL `NULL`, and projection
104
+ failures do not roll back Flow Attributes. `None` preserves current targets;
105
+ an explicit empty list disables future synchronization while retaining protocol
106
+ presence.
106
107
 
107
108
  ```
108
109
  pip install dex-python-sdk==0.1.0
@@ -144,9 +145,9 @@ its normal decision:
144
145
 
145
146
  ```python
146
147
  return (
147
- dex.go_to(self.record_quote, quote)
148
- .with_canceling_sibling_steps(self.carrier_a, self.carrier_b)
149
- .with_canceling_steps(self.global_quote_timeout)
148
+ dex.go_to(RecordQuote, quote)
149
+ .with_canceling_sibling_steps(QuoteCarrierA, QuoteCarrierB)
150
+ .with_canceling_steps(GlobalQuoteTimeout)
150
151
  )
151
152
  ```
152
153
 
@@ -193,7 +194,7 @@ options = dex.StartFlowOptions(
193
194
  Register async hooks with `allow_async_handlers=True` and run them with
194
195
  `AsyncWorker`. `FAIL` produces `FlowErrorType.FLOW_TIMEOUT` and permits Flow
195
196
  retry; `CANCEL` cancels without retry. Continue-as-new preserves the deadline,
196
- while retry and cron runs receive a fresh budget. A zero or absent timeout
197
+ while retry runs receive a fresh budget. A zero or absent timeout
197
198
  disables the feature.
198
199
 
199
200
  `Registry` validates every Flow, Step, RPC signature, durable name, lock, and
@@ -80,13 +80,14 @@ Flow configuration:
80
80
 
81
81
  ```python
82
82
  email = dex.Attribute("customer-email", str, sync_to_attribute_store=True)
83
- config = dex.FlowConfig(attribute_store_name="profiles")
83
+ config = dex.FlowConfig(attribute_store_names=["profiles", "audit"])
84
84
  ```
85
85
 
86
- The Store is an asynchronous latest-state projection. Deletion writes SQL
87
- `NULL`, and projection failures do not roll back Flow Attributes. `None`
88
- preserves the current target; an explicit empty string disables future
89
- synchronization while retaining protocol presence.
86
+ Stores are asynchronous latest-state projections. Every enabled Attribute write
87
+ is sent to every selected Store. Deletion writes SQL `NULL`, and projection
88
+ failures do not roll back Flow Attributes. `None` preserves current targets;
89
+ an explicit empty list disables future synchronization while retaining protocol
90
+ presence.
90
91
 
91
92
  ```
92
93
  pip install dex-python-sdk==0.1.0
@@ -128,9 +129,9 @@ its normal decision:
128
129
 
129
130
  ```python
130
131
  return (
131
- dex.go_to(self.record_quote, quote)
132
- .with_canceling_sibling_steps(self.carrier_a, self.carrier_b)
133
- .with_canceling_steps(self.global_quote_timeout)
132
+ dex.go_to(RecordQuote, quote)
133
+ .with_canceling_sibling_steps(QuoteCarrierA, QuoteCarrierB)
134
+ .with_canceling_steps(GlobalQuoteTimeout)
134
135
  )
135
136
  ```
136
137
 
@@ -177,7 +178,7 @@ options = dex.StartFlowOptions(
177
178
  Register async hooks with `allow_async_handlers=True` and run them with
178
179
  `AsyncWorker`. `FAIL` produces `FlowErrorType.FLOW_TIMEOUT` and permits Flow
179
180
  retry; `CANCEL` cancels without retry. Continue-as-new preserves the deadline,
180
- while retry and cron runs receive a fresh budget. A zero or absent timeout
181
+ while retry runs receive a fresh budget. A zero or absent timeout
181
182
  disables the feature.
182
183
 
183
184
  `Registry` validates every Flow, Step, RPC signature, durable name, lock, and
@@ -456,8 +456,10 @@ class WorkerDispatcher:
456
456
  is_headless_address=config.worker_target.headless,
457
457
  )
458
458
  )
459
- if config.attribute_store_name is not None:
460
- mapped.attribute_sync_config_name = config.attribute_store_name
459
+ if config.attribute_store_names is not None:
460
+ mapped.attribute_store_names.CopyFrom(
461
+ pb.AttributeStoreNames(names=config.attribute_store_names)
462
+ )
461
463
  return mapped
462
464
 
463
465
  def _map_decision(
@@ -529,7 +531,7 @@ class WorkerDispatcher:
529
531
  def _map_cancellation_steps(
530
532
  self,
531
533
  flow: _RegisteredFlow,
532
- steps: tuple[Step[Any], ...],
534
+ steps: tuple[type[Step[Any]], ...],
533
535
  ) -> list[str]:
534
536
  step_types: list[str] = []
535
537
  seen: set[str] = set()
@@ -585,13 +587,9 @@ class WorkerDispatcher:
585
587
  @staticmethod
586
588
  def _registered_movement_target(
587
589
  flow: _RegisteredFlow,
588
- step: object,
590
+ step: type[Step[Any]],
589
591
  ) -> _RegisteredStep:
590
- step_type = getattr(step, "get_step_type", lambda: "")()
591
- target = flow.step(step_type)
592
- if target.step is not step:
593
- raise ValueError("Step movement target does not belong to Flow")
594
- return target
592
+ return flow.step_class(step)
595
593
 
596
594
  @staticmethod
597
595
  def _require_persistence_identity(
@@ -1018,7 +1018,6 @@ class AsyncClient:
1018
1018
  ),
1019
1019
  IdReusePolicy.DISALLOW: pb.ID_REUSE_POLICY_DISALLOW_REUSE,
1020
1020
  }[options.id_reuse_policy],
1021
- cron_schedule=options.cron_schedule or "",
1022
1021
  flow_already_started_options=pb.FlowAlreadyStartedOptions(
1023
1022
  ignore_already_started_error=options.ignore_already_started
1024
1023
  ),
@@ -1078,8 +1077,10 @@ class AsyncClient:
1078
1077
  StepDurability.SYNC: pb.STEP_DURABILITY_SYNC,
1079
1078
  StepDurability.ASYNC: pb.STEP_DURABILITY_ASYNC,
1080
1079
  }[config.step_durability]
1081
- if config.attribute_store_name is not None:
1082
- mapped.attribute_sync_config_name = config.attribute_store_name
1080
+ if config.attribute_store_names is not None:
1081
+ mapped.attribute_store_names.CopyFrom(
1082
+ pb.AttributeStoreNames(names=config.attribute_store_names)
1083
+ )
1083
1084
  target = (
1084
1085
  config.worker_target
1085
1086
  if config is not None and config.worker_target is not None
@@ -1019,7 +1019,6 @@ class Client:
1019
1019
  ),
1020
1020
  IdReusePolicy.DISALLOW: pb.ID_REUSE_POLICY_DISALLOW_REUSE,
1021
1021
  }[options.id_reuse_policy],
1022
- cron_schedule=options.cron_schedule or "",
1023
1022
  flow_already_started_options=pb.FlowAlreadyStartedOptions(
1024
1023
  ignore_already_started_error=options.ignore_already_started
1025
1024
  ),
@@ -1079,8 +1078,10 @@ class Client:
1079
1078
  StepDurability.SYNC: pb.STEP_DURABILITY_SYNC,
1080
1079
  StepDurability.ASYNC: pb.STEP_DURABILITY_ASYNC,
1081
1080
  }[config.step_durability]
1082
- if config.attribute_store_name is not None:
1083
- mapped.attribute_sync_config_name = config.attribute_store_name
1081
+ if config.attribute_store_names is not None:
1082
+ mapped.attribute_store_names.CopyFrom(
1083
+ pb.AttributeStoreNames(names=config.attribute_store_names)
1084
+ )
1084
1085
  target = (
1085
1086
  config.worker_target
1086
1087
  if config is not None and config.worker_target is not None