dex-python-sdk 1.44.0__tar.gz → 1.45.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 (80) hide show
  1. dex_python_sdk-1.44.0/README.md → dex_python_sdk-1.45.1/PKG-INFO +37 -2
  2. dex_python_sdk-1.44.0/PKG-INFO → dex_python_sdk-1.45.1/README.md +20 -19
  3. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/__init__.py +8 -0
  4. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/_async_worker_dispatcher.py +1 -1
  5. dex_python_sdk-1.45.1/dex/_flow_definition_upload.py +694 -0
  6. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/_pull_worker.py +30 -9
  7. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/_server_protocol.py +12 -1
  8. dex_python_sdk-1.45.1/dex/_task_queue_names.py +47 -0
  9. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/_worker_dispatcher.py +13 -2
  10. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/async_client.py +105 -3
  11. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/async_worker.py +53 -2
  12. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/client.py +105 -3
  13. dex_python_sdk-1.45.1/dex/dexpb/dex_pb2.py +457 -0
  14. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/dexpb/dex_pb2.pyi +121 -8
  15. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/dexpb/dex_pb2_grpc.py +177 -3
  16. dex_python_sdk-1.45.1/dex/flow_definition.py +133 -0
  17. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/flow_options.py +72 -6
  18. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/join.py +22 -15
  19. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/pull_registration.py +37 -9
  20. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/step.py +13 -0
  21. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/subflow.py +13 -0
  22. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/worker.py +43 -3
  23. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/worker_options.py +104 -1
  24. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/pyproject.toml +1 -1
  25. dex_python_sdk-1.44.0/dex/dexpb/dex_pb2.py +0 -435
  26. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/LEGACY_NOTICES.md +0 -0
  27. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/LICENSE +0 -0
  28. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/_async_value_hydrator.py +0 -0
  29. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/_attribute_reads.py +0 -0
  30. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/_credential_transport.py +0 -0
  31. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/_flow_service_tls.py +0 -0
  32. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/_grpc_errors.py +0 -0
  33. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/_invocation_context.py +0 -0
  34. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/_message_size.py +0 -0
  35. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/_native.pyi +0 -0
  36. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/_utils.py +0 -0
  37. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/_value_hydrator.py +0 -0
  38. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/_value_mapper.py +0 -0
  39. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/action.py +0 -0
  40. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/attribute.py +0 -0
  41. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/attribute_match.py +0 -0
  42. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/attribute_values.py +0 -0
  43. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/blob_cache.py +0 -0
  44. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/channel.py +0 -0
  45. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/client_options.py +0 -0
  46. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/codec.py +0 -0
  47. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/condition.py +0 -0
  48. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/context.py +0 -0
  49. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/credential.py +0 -0
  50. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/dexpb/__init__.py +0 -0
  51. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/flow.py +0 -0
  52. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/flow_config.py +0 -0
  53. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/flow_info.py +0 -0
  54. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/flow_result.py +0 -0
  55. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/flow_service_tls_options.py +0 -0
  56. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/py.typed +0 -0
  57. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/rpc_invoke_options.py +0 -0
  58. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/runtime_errors.py +0 -0
  59. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/step_execution.py +0 -0
  60. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/stream.py +0 -0
  61. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/timer.py +0 -0
  62. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/wait.py +0 -0
  63. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/dex/wait_options.py +0 -0
  64. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/sdk-rust/Cargo.lock +0 -0
  65. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/sdk-rust/Cargo.toml +0 -0
  66. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/sdk-rust/crates/dex-blob-cache/Cargo.toml +0 -0
  67. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/sdk-rust/crates/dex-blob-cache/LICENSE +0 -0
  68. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/sdk-rust/crates/dex-blob-cache/README.md +0 -0
  69. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/sdk-rust/crates/dex-blob-cache/src/config.rs +0 -0
  70. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/sdk-rust/crates/dex-blob-cache/src/entry.rs +0 -0
  71. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/sdk-rust/crates/dex-blob-cache/src/error.rs +0 -0
  72. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/sdk-rust/crates/dex-blob-cache/src/format.rs +0 -0
  73. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/sdk-rust/crates/dex-blob-cache/src/lib.rs +0 -0
  74. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/sdk-rust/crates/dex-blob-cache/src/policy.rs +0 -0
  75. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/sdk-rust/crates/dex-blob-cache/src/store.rs +0 -0
  76. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/sdk-rust/crates/dex-blob-cache/tests/blob_cache_integration.rs +0 -0
  77. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/sdk-rust/crates/dex-blob-cache-python/Cargo.toml +0 -0
  78. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/sdk-rust/crates/dex-blob-cache-python/LICENSE +0 -0
  79. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/sdk-rust/crates/dex-blob-cache-python/README.md +0 -0
  80. {dex_python_sdk-1.44.0 → dex_python_sdk-1.45.1}/sdk-rust/crates/dex-blob-cache-python/src/lib.rs +0 -0
@@ -1,3 +1,19 @@
1
+ Metadata-Version: 2.4
2
+ Name: dex-python-sdk
3
+ Version: 1.45.1
4
+ Requires-Dist: grpcio>=1.83.0
5
+ Requires-Dist: grpcio-status>=1.83.0
6
+ Requires-Dist: protobuf>=7.35.1
7
+ License-File: LICENSE
8
+ License-File: LEGACY_NOTICES.md
9
+ Summary: Python SDK for the Dex workflow engine
10
+ Author: Super Durable
11
+ License-Expression: LicenseRef-Sustainable-Use-1.0
12
+ Requires-Python: >=3.11
13
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
14
+ Project-URL: Homepage, https://github.com/superdurable/dex/tree/main/sdk-python
15
+ Project-URL: Repository, https://github.com/superdurable/dex
16
+
1
17
 
2
18
  # Dex SDK for Python
3
19
 
@@ -292,8 +308,8 @@ A permanent rejection before readiness raises `PullRegistrationError`, whose
292
308
  Stopping before readiness raises `RuntimeError`.
293
309
 
294
310
  Use `worker.pull_registration_state()` for subsequent readiness probes. Its
295
- immutable `queues` expose `queue`, `has_registered_stream`, and
296
- `last_permanent_error`. After initial registration, `is_ready` stays true across
311
+ immutable `queues` expose `queue`, `has_registered_stream`,
312
+ `last_permanent_error`, and `task_queue`. After initial registration, `is_ready` stays true across
297
313
  transient failures, reconnects, and stop. It becomes false only when a required slot kind
298
314
  has a permanent error and no registered stream. Re-registration clears the
299
315
  error. The startup wait keeps succeeding after initial registration, including
@@ -325,6 +341,24 @@ The Worker never declines a Step for capacity.
325
341
  pull = PullWorkerOptions(max_concurrent_tasks=8, reserved_rpc_tasks=2)
326
342
  ```
327
343
 
344
+ ### Named task queues
345
+
346
+ `PullWorkerOptions(task_queue="gpu")` makes a Worker poll the `gpu` task queue,
347
+ and `StartFlowOptions(task_queue="gpu")` starts a Flow on it. Only Workers on
348
+ that task queue that register the Flow type receive its Steps and RPCs. A Worker
349
+ polls one task queue; run one Worker per task queue to serve several. An empty
350
+ name selects the default task queue. A SubFlow inherits its parent's task queue
351
+ unless `SubFlowOptions.task_queue` names another one or `dex.default`. Named
352
+ task queues need Dex Server protocol version 5; see the `task_queue` doc
353
+ comments for name rules and failure behavior.
354
+
355
+ ```python
356
+ gpu_worker = Worker(
357
+ registry, cache, WorkerOptions(pull=PullWorkerOptions(task_queue="gpu"))
358
+ )
359
+ client.start_flow(render_flow, "render-7", render_input, StartFlowOptions(task_queue="gpu"))
360
+ ```
361
+
328
362
  The `pull_reserved_rpc_declines` counter is deprecated and always zero. It stays
329
363
  available for source compatibility. Registration snapshot `queues` and error
330
364
  `queue` fields retain their names but now hold slot kind labels, `STEP_AND_RPC`
@@ -1152,3 +1186,4 @@ original terms as described in [LEGACY_NOTICES.md](LEGACY_NOTICES.md).
1152
1186
 
1153
1187
  Searches return runs that match the query. Include `FlowType` when using shared
1154
1188
  index slots, and keep the query and page size consistent across pages.
1189
+
@@ -1,19 +1,3 @@
1
- Metadata-Version: 2.4
2
- Name: dex-python-sdk
3
- Version: 1.44.0
4
- Requires-Dist: grpcio>=1.83.0
5
- Requires-Dist: grpcio-status>=1.83.0
6
- Requires-Dist: protobuf>=7.35.1
7
- License-File: LICENSE
8
- License-File: LEGACY_NOTICES.md
9
- Summary: Python SDK for the Dex workflow engine
10
- Author: Super Durable
11
- License-Expression: LicenseRef-Sustainable-Use-1.0
12
- Requires-Python: >=3.11
13
- Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
14
- Project-URL: Homepage, https://github.com/superdurable/dex/tree/main/sdk-python
15
- Project-URL: Repository, https://github.com/superdurable/dex
16
-
17
1
 
18
2
  # Dex SDK for Python
19
3
 
@@ -308,8 +292,8 @@ A permanent rejection before readiness raises `PullRegistrationError`, whose
308
292
  Stopping before readiness raises `RuntimeError`.
309
293
 
310
294
  Use `worker.pull_registration_state()` for subsequent readiness probes. Its
311
- immutable `queues` expose `queue`, `has_registered_stream`, and
312
- `last_permanent_error`. After initial registration, `is_ready` stays true across
295
+ immutable `queues` expose `queue`, `has_registered_stream`,
296
+ `last_permanent_error`, and `task_queue`. After initial registration, `is_ready` stays true across
313
297
  transient failures, reconnects, and stop. It becomes false only when a required slot kind
314
298
  has a permanent error and no registered stream. Re-registration clears the
315
299
  error. The startup wait keeps succeeding after initial registration, including
@@ -341,6 +325,24 @@ The Worker never declines a Step for capacity.
341
325
  pull = PullWorkerOptions(max_concurrent_tasks=8, reserved_rpc_tasks=2)
342
326
  ```
343
327
 
328
+ ### Named task queues
329
+
330
+ `PullWorkerOptions(task_queue="gpu")` makes a Worker poll the `gpu` task queue,
331
+ and `StartFlowOptions(task_queue="gpu")` starts a Flow on it. Only Workers on
332
+ that task queue that register the Flow type receive its Steps and RPCs. A Worker
333
+ polls one task queue; run one Worker per task queue to serve several. An empty
334
+ name selects the default task queue. A SubFlow inherits its parent's task queue
335
+ unless `SubFlowOptions.task_queue` names another one or `dex.default`. Named
336
+ task queues need Dex Server protocol version 5; see the `task_queue` doc
337
+ comments for name rules and failure behavior.
338
+
339
+ ```python
340
+ gpu_worker = Worker(
341
+ registry, cache, WorkerOptions(pull=PullWorkerOptions(task_queue="gpu"))
342
+ )
343
+ client.start_flow(render_flow, "render-7", render_input, StartFlowOptions(task_queue="gpu"))
344
+ ```
345
+
344
346
  The `pull_reserved_rpc_declines` counter is deprecated and always zero. It stays
345
347
  available for source compatibility. Registration snapshot `queues` and error
346
348
  `queue` fields retain their names but now hold slot kind labels, `STEP_AND_RPC`
@@ -1168,4 +1170,3 @@ original terms as described in [LEGACY_NOTICES.md](LEGACY_NOTICES.md).
1168
1170
 
1169
1171
  Searches return runs that match the query. Include `FlowType` when using shared
1170
1172
  index slots, and keep the query and page size consistent across pages.
1171
-
@@ -55,6 +55,11 @@ from dex.credential import (
55
55
  )
56
56
  from dex.flow import Flow, PersistenceSchema, Registry, RPCResult, rpc
57
57
  from dex.flow_config import ActiveStepSearchMode, FlowConfig
58
+ from dex.flow_definition import (
59
+ FlowDefinitionDocument,
60
+ FlowDefinitionUploadOutcome,
61
+ FlowDefinitionUploadResult,
62
+ )
58
63
  from dex.flow_info import (
59
64
  FlowInfo,
60
65
  FlowStatus,
@@ -191,6 +196,9 @@ __all__ = [
191
196
  "FlowAlreadyStartedError",
192
197
  "FlowClosingError",
193
198
  "FlowConfig",
199
+ "FlowDefinitionDocument",
200
+ "FlowDefinitionUploadOutcome",
201
+ "FlowDefinitionUploadResult",
194
202
  "FlowDefinitionError",
195
203
  "FlowErrorType",
196
204
  "FlowInfo",
@@ -147,7 +147,7 @@ class AsyncWorkerDispatcher(WorkerDispatcher):
147
147
  publish_to_channel=context.publications,
148
148
  delete_from_channel=context.channel_deletions,
149
149
  )
150
- waiting = self._map_wait(flow, wait)
150
+ waiting = self._map_wait(flow, step.name, wait)
151
151
  if waiting is not None:
152
152
  response.waiting_condition.CopyFrom(waiting)
153
153
  except InvalidStepResultError as error: