dex-python-sdk 0.3.2__tar.gz → 0.4.0__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.
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/LEGACY_NOTICES.md +2 -2
- dex_python_sdk-0.4.0/LICENSE +105 -0
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/PKG-INFO +8 -6
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/README.md +6 -4
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/__init__.py +3 -1
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/_async_value_hydrator.py +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/_async_worker_dispatcher.py +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/_async_worker_service.py +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/_grpc_errors.py +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/_invocation_context.py +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/_native.pyi +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/_utils.py +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/_value_hydrator.py +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/_value_mapper.py +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/_worker_dispatcher.py +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/_worker_service.py +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/async_client.py +75 -68
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/async_worker.py +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/attribute.py +1 -1
- dex_python_sdk-0.4.0/dex/attribute_match.py +130 -0
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/blob_cache.py +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/channel.py +1 -1
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/client.py +76 -67
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/client_options.py +1 -1
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/codec.py +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/condition.py +1 -1
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/context.py +1 -1
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/dexpb/dex_pb2.py +245 -243
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/dexpb/dex_pb2.pyi +33 -16
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/dexpb/dex_pb2_grpc.py +3 -3
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/flow.py +1 -1
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/flow_config.py +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/flow_info.py +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/flow_options.py +1 -1
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/flow_result.py +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/runtime_errors.py +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/step.py +1 -1
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/step_execution.py +1 -1
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/stream.py +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/subflow.py +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/timer.py +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/wait.py +1 -1
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/worker.py +1 -1
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/worker_options.py +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/pyproject.toml +2 -2
- dex_python_sdk-0.4.0/sdk-rust/crates/dex-blob-cache/LICENSE +105 -0
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/sdk-rust/crates/dex-blob-cache/src/config.rs +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/sdk-rust/crates/dex-blob-cache/src/entry.rs +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/sdk-rust/crates/dex-blob-cache/src/error.rs +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/sdk-rust/crates/dex-blob-cache/src/format.rs +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/sdk-rust/crates/dex-blob-cache/src/lib.rs +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/sdk-rust/crates/dex-blob-cache/src/policy.rs +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/sdk-rust/crates/dex-blob-cache/src/store.rs +2 -2
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/sdk-rust/crates/dex-blob-cache/tests/blob_cache_integration.rs +2 -2
- dex_python_sdk-0.4.0/sdk-rust/crates/dex-blob-cache-python/LICENSE +105 -0
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/sdk-rust/crates/dex-blob-cache-python/src/lib.rs +2 -2
- dex_python_sdk-0.3.2/LICENSE +0 -192
- dex_python_sdk-0.3.2/sdk-rust/crates/dex-blob-cache/LICENSE +0 -192
- dex_python_sdk-0.3.2/sdk-rust/crates/dex-blob-cache-python/LICENSE +0 -192
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/dexpb/__init__.py +0 -0
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/dex/py.typed +0 -0
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/sdk-rust/Cargo.lock +0 -0
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/sdk-rust/Cargo.toml +0 -0
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/sdk-rust/crates/dex-blob-cache/Cargo.toml +0 -0
- {dex_python_sdk-0.3.2 → dex_python_sdk-0.4.0}/sdk-rust/crates/dex-blob-cache-python/Cargo.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Legacy and third-party notices
|
|
2
2
|
|
|
3
|
-
The
|
|
3
|
+
The Sustainable Use License 1.0 applies only to material owned or
|
|
4
4
|
licensable by Super Durable, Inc. It does not replace the licenses below.
|
|
5
5
|
|
|
6
6
|
## Legacy cutoff
|
|
@@ -57,5 +57,5 @@ or translations of the `indeedeng/iwf-java-sdk` integration suite at commit
|
|
|
57
57
|
- `sdk-typescript/test/integ/`
|
|
58
58
|
|
|
59
59
|
The upstream portions remain licensed under the Apache License 2.0. Super
|
|
60
|
-
Durable modifications are licensed under the
|
|
60
|
+
Durable modifications are licensed under the Sustainable Use License 1.0.
|
|
61
61
|
The Apache License 2.0 text is in `LICENSES/Apache-2.0.txt`.
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Super Durable, Inc.
|
|
4
|
+
|
|
5
|
+
Portions of this software are licensed as follows:
|
|
6
|
+
|
|
7
|
+
- Legacy Materials remain under their original licenses as described in
|
|
8
|
+
`LEGACY_NOTICES.md`.
|
|
9
|
+
- Third-Party Materials remain under the licenses provided by their owners.
|
|
10
|
+
- The `docs/` and `examples/` directories are not licensed under the
|
|
11
|
+
Sustainable Use License and retain their existing licensing status.
|
|
12
|
+
- All other material owned or licensable by Super Durable, Inc. is available
|
|
13
|
+
under the Sustainable Use License below.
|
|
14
|
+
|
|
15
|
+
See `LEGACY_NOTICES.md` for the applicable legacy and third-party notices.
|
|
16
|
+
|
|
17
|
+
## Sustainable Use License
|
|
18
|
+
|
|
19
|
+
Version 1.0
|
|
20
|
+
|
|
21
|
+
### Acceptance
|
|
22
|
+
|
|
23
|
+
By using the software, you agree to all of the terms and conditions below.
|
|
24
|
+
|
|
25
|
+
### Copyright License
|
|
26
|
+
|
|
27
|
+
The licensor grants you a non-exclusive, royalty-free, worldwide,
|
|
28
|
+
non-sublicensable, non-transferable license to use, copy, distribute, make
|
|
29
|
+
available, and prepare derivative works of the software, in each case subject
|
|
30
|
+
to the limitations below.
|
|
31
|
+
|
|
32
|
+
### Limitations
|
|
33
|
+
|
|
34
|
+
You may use or modify the software only for your own internal business purposes
|
|
35
|
+
or for non-commercial or personal use. You may distribute the software or
|
|
36
|
+
provide it to others only if you do so free of charge for non-commercial
|
|
37
|
+
purposes. You may not alter, remove, or obscure any licensing, copyright, or
|
|
38
|
+
other notices of the licensor in the software. Any use of the licensor's
|
|
39
|
+
trademarks is subject to applicable law.
|
|
40
|
+
|
|
41
|
+
### Patents
|
|
42
|
+
|
|
43
|
+
The licensor grants you a license, under any patent claims the licensor can
|
|
44
|
+
license, or becomes able to license, to make, have made, use, sell, offer for
|
|
45
|
+
sale, import and have imported the software, in each case subject to the
|
|
46
|
+
limitations and conditions in this license. This license does not cover any
|
|
47
|
+
patent claims that you cause to be infringed by modifications or additions to
|
|
48
|
+
the software.
|
|
49
|
+
|
|
50
|
+
If you or your company make any written claim that the software infringes or
|
|
51
|
+
contributes to infringement of any patent, your patent license for the software
|
|
52
|
+
granted under these terms ends immediately. If your company makes such a claim,
|
|
53
|
+
your patent license ends immediately for work on behalf of your company.
|
|
54
|
+
|
|
55
|
+
### Notices
|
|
56
|
+
|
|
57
|
+
You must ensure that anyone who gets a copy of any part of the software from
|
|
58
|
+
you also gets a copy of these terms. If you modify the software, you must
|
|
59
|
+
include in any modified copies of the software a prominent notice stating that
|
|
60
|
+
you have modified the software.
|
|
61
|
+
|
|
62
|
+
### No Other Rights
|
|
63
|
+
|
|
64
|
+
These terms do not imply any licenses other than those expressly granted in
|
|
65
|
+
these terms.
|
|
66
|
+
|
|
67
|
+
### Termination
|
|
68
|
+
|
|
69
|
+
If you use the software in violation of these terms, such use is not licensed,
|
|
70
|
+
and your license will automatically terminate. If the licensor provides you
|
|
71
|
+
with a notice of your violation, and you cease all violation of this license no
|
|
72
|
+
later than 30 days after you receive that notice, your license will be
|
|
73
|
+
reinstated retroactively. However, if you violate these terms after such
|
|
74
|
+
reinstatement, any additional violation of these terms will cause your license
|
|
75
|
+
to terminate automatically and permanently.
|
|
76
|
+
|
|
77
|
+
### No Liability
|
|
78
|
+
|
|
79
|
+
As far as the law allows, the software comes as is, without any warranty or
|
|
80
|
+
condition, and the licensor will not be liable to you for any damages arising
|
|
81
|
+
out of these terms or the use or nature of the software, under any kind of
|
|
82
|
+
legal claim.
|
|
83
|
+
|
|
84
|
+
### Definitions
|
|
85
|
+
|
|
86
|
+
The "licensor" is the entity offering these terms.
|
|
87
|
+
|
|
88
|
+
The "software" is the software the licensor makes available under these terms,
|
|
89
|
+
including any portion of it.
|
|
90
|
+
|
|
91
|
+
"You" refers to the individual or entity agreeing to these terms.
|
|
92
|
+
|
|
93
|
+
"Your company" is any legal entity, sole proprietorship, or other kind of
|
|
94
|
+
organization that you work for, plus all organizations that have control over,
|
|
95
|
+
are under the control of, or are under common control with that organization.
|
|
96
|
+
Control means ownership of substantially all the assets of an entity, or the
|
|
97
|
+
power to direct its management and policies by vote, contract, or otherwise.
|
|
98
|
+
Control can be direct or indirect.
|
|
99
|
+
|
|
100
|
+
"Your license" is the license granted to you for the software under these
|
|
101
|
+
terms.
|
|
102
|
+
|
|
103
|
+
"Use" means anything you do with the software requiring your license.
|
|
104
|
+
|
|
105
|
+
"Trademark" means trademarks, service marks, and similar rights.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dex-python-sdk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.4.0
|
|
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
|
|
@@ -8,7 +8,7 @@ License-File: LICENSE
|
|
|
8
8
|
License-File: LEGACY_NOTICES.md
|
|
9
9
|
Summary: Python SDK for the Dex workflow engine
|
|
10
10
|
Author: Super Durable
|
|
11
|
-
License-Expression: LicenseRef-
|
|
11
|
+
License-Expression: LicenseRef-Sustainable-Use-1.0
|
|
12
12
|
Requires-Python: >=3.11
|
|
13
13
|
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
14
14
|
Project-URL: Homepage, https://github.com/superdurable/dex/tree/main/sdk-python
|
|
@@ -343,9 +343,11 @@ non-empty user ID; the same Condition instance may appear in multiple
|
|
|
343
343
|
combinations.
|
|
344
344
|
|
|
345
345
|
Both `Client` and `AsyncClient` provide singleton and AttributeMap-instance
|
|
346
|
-
overloads of `
|
|
347
|
-
|
|
348
|
-
|
|
346
|
+
overloads of `wait_for_attribute_match`. Build matches with the six
|
|
347
|
+
`AttributeMatch` factories. The method targets the current run and returns the
|
|
348
|
+
decoded matched value. String and bool support equality operators; int and
|
|
349
|
+
float support every operator. JSON objects, bytes, null, non-finite floats, and
|
|
350
|
+
invalid ordering fail before transport. Every AttributeMap and ChannelMap instance must be non-empty
|
|
349
351
|
and must not contain `/`. `AttributeMap.get_map_size/get_all_instance_keys` include
|
|
350
352
|
buffered sets and deletes. The matching `ChannelMap` methods are RPC-only,
|
|
351
353
|
include buffered publishes, and omit empty instances. Keys are decoded and
|
|
@@ -538,6 +540,6 @@ See [CONTRIBUTING.md](../CONTRIBUTING.md#releases-monorepo-tags) for monorepo ta
|
|
|
538
540
|
|
|
539
541
|
## License
|
|
540
542
|
|
|
541
|
-
[
|
|
543
|
+
[Sustainable Use License 1.0](LICENSE), with legacy portions under their
|
|
542
544
|
original terms as described in [LEGACY_NOTICES.md](LEGACY_NOTICES.md).
|
|
543
545
|
|
|
@@ -327,9 +327,11 @@ non-empty user ID; the same Condition instance may appear in multiple
|
|
|
327
327
|
combinations.
|
|
328
328
|
|
|
329
329
|
Both `Client` and `AsyncClient` provide singleton and AttributeMap-instance
|
|
330
|
-
overloads of `
|
|
331
|
-
|
|
332
|
-
|
|
330
|
+
overloads of `wait_for_attribute_match`. Build matches with the six
|
|
331
|
+
`AttributeMatch` factories. The method targets the current run and returns the
|
|
332
|
+
decoded matched value. String and bool support equality operators; int and
|
|
333
|
+
float support every operator. JSON objects, bytes, null, non-finite floats, and
|
|
334
|
+
invalid ordering fail before transport. Every AttributeMap and ChannelMap instance must be non-empty
|
|
333
335
|
and must not contain `/`. `AttributeMap.get_map_size/get_all_instance_keys` include
|
|
334
336
|
buffered sets and deletes. The matching `ChannelMap` methods are RPC-only,
|
|
335
337
|
include buffered publishes, and omit empty instances. Keys are decoded and
|
|
@@ -522,5 +524,5 @@ See [CONTRIBUTING.md](../CONTRIBUTING.md#releases-monorepo-tags) for monorepo ta
|
|
|
522
524
|
|
|
523
525
|
## License
|
|
524
526
|
|
|
525
|
-
[
|
|
527
|
+
[Sustainable Use License 1.0](LICENSE), with legacy portions under their
|
|
526
528
|
original terms as described in [LEGACY_NOTICES.md](LEGACY_NOTICES.md).
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# Modifications Copyright (c) 2026 Super Durable, Inc.
|
|
5
5
|
#
|
|
6
6
|
# Modifications after the Legacy Cutoff are licensed under the
|
|
7
|
-
#
|
|
7
|
+
# Sustainable Use License 1.0.
|
|
8
8
|
# Legacy Materials remain under their original licenses.
|
|
9
9
|
# See LICENSE and LEGACY_NOTICES.md.
|
|
10
10
|
|
|
@@ -19,6 +19,7 @@ from dex.attribute import (
|
|
|
19
19
|
AttributeMapLoad,
|
|
20
20
|
IndexType,
|
|
21
21
|
)
|
|
22
|
+
from dex.attribute_match import AttributeMatch
|
|
22
23
|
from dex.blob_cache import BlobCache, BlobCacheConfig, open_blob_cache
|
|
23
24
|
from dex.channel import Channel, ChannelMap, ChannelMapLoad, ChannelMessage
|
|
24
25
|
from dex.client import Client
|
|
@@ -122,6 +123,7 @@ __all__ = [
|
|
|
122
123
|
"AttributeMap",
|
|
123
124
|
"AttributeMapLoad",
|
|
124
125
|
"AttributeMapNotLoadedError",
|
|
126
|
+
"AttributeMatch",
|
|
125
127
|
"AsyncContext",
|
|
126
128
|
"AsyncClient",
|
|
127
129
|
"AsyncBufferedTextStream",
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Copyright (c) 2026 Super Durable, Inc.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the
|
|
3
|
+
# Licensed under the Sustainable Use License 1.0.
|
|
4
4
|
# You may not use this file except in compliance with the License.
|
|
5
5
|
# See the LICENSE file in the repository root.
|
|
6
6
|
#
|
|
7
|
-
# SPDX-License-Identifier: LicenseRef-
|
|
7
|
+
# SPDX-License-Identifier: LicenseRef-Sustainable-Use-1.0
|
|
8
8
|
|
|
9
9
|
from __future__ import annotations
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Copyright (c) 2026 Super Durable, Inc.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the
|
|
3
|
+
# Licensed under the Sustainable Use License 1.0.
|
|
4
4
|
# You may not use this file except in compliance with the License.
|
|
5
5
|
# See the LICENSE file in the repository root.
|
|
6
6
|
#
|
|
7
|
-
# SPDX-License-Identifier: LicenseRef-
|
|
7
|
+
# SPDX-License-Identifier: LicenseRef-Sustainable-Use-1.0
|
|
8
8
|
|
|
9
9
|
from __future__ import annotations
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Copyright (c) 2026 Super Durable, Inc.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the
|
|
3
|
+
# Licensed under the Sustainable Use License 1.0.
|
|
4
4
|
# You may not use this file except in compliance with the License.
|
|
5
5
|
# See the LICENSE file in the repository root.
|
|
6
6
|
#
|
|
7
|
-
# SPDX-License-Identifier: LicenseRef-
|
|
7
|
+
# SPDX-License-Identifier: LicenseRef-Sustainable-Use-1.0
|
|
8
8
|
|
|
9
9
|
from __future__ import annotations
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Copyright (c) 2026 Super Durable, Inc.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the
|
|
3
|
+
# Licensed under the Sustainable Use License 1.0.
|
|
4
4
|
# You may not use this file except in compliance with the License.
|
|
5
5
|
# See the LICENSE file in the repository root.
|
|
6
6
|
#
|
|
7
|
-
# SPDX-License-Identifier: LicenseRef-
|
|
7
|
+
# SPDX-License-Identifier: LicenseRef-Sustainable-Use-1.0
|
|
8
8
|
|
|
9
9
|
from __future__ import annotations
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Copyright (c) 2026 Super Durable, Inc.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the
|
|
3
|
+
# Licensed under the Sustainable Use License 1.0.
|
|
4
4
|
# You may not use this file except in compliance with the License.
|
|
5
5
|
# See the LICENSE file in the repository root.
|
|
6
6
|
#
|
|
7
|
-
# SPDX-License-Identifier: LicenseRef-
|
|
7
|
+
# SPDX-License-Identifier: LicenseRef-Sustainable-Use-1.0
|
|
8
8
|
|
|
9
9
|
from __future__ import annotations
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Copyright (c) 2026 Super Durable, Inc.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the
|
|
3
|
+
# Licensed under the Sustainable Use License 1.0.
|
|
4
4
|
# You may not use this file except in compliance with the License.
|
|
5
5
|
# See the LICENSE file in the repository root.
|
|
6
6
|
#
|
|
7
|
-
# SPDX-License-Identifier: LicenseRef-
|
|
7
|
+
# SPDX-License-Identifier: LicenseRef-Sustainable-Use-1.0
|
|
8
8
|
|
|
9
9
|
class NativeBlobCache:
|
|
10
10
|
def __init__(
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Copyright (c) 2026 Super Durable, Inc.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the
|
|
3
|
+
# Licensed under the Sustainable Use License 1.0.
|
|
4
4
|
# You may not use this file except in compliance with the License.
|
|
5
5
|
# See the LICENSE file in the repository root.
|
|
6
6
|
#
|
|
7
|
-
# SPDX-License-Identifier: LicenseRef-
|
|
7
|
+
# SPDX-License-Identifier: LicenseRef-Sustainable-Use-1.0
|
|
8
8
|
|
|
9
9
|
|
|
10
10
|
def require_name(name: str) -> str:
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Copyright (c) 2026 Super Durable, Inc.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the
|
|
3
|
+
# Licensed under the Sustainable Use License 1.0.
|
|
4
4
|
# You may not use this file except in compliance with the License.
|
|
5
5
|
# See the LICENSE file in the repository root.
|
|
6
6
|
#
|
|
7
|
-
# SPDX-License-Identifier: LicenseRef-
|
|
7
|
+
# SPDX-License-Identifier: LicenseRef-Sustainable-Use-1.0
|
|
8
8
|
|
|
9
9
|
from __future__ import annotations
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Copyright (c) 2026 Super Durable, Inc.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the
|
|
3
|
+
# Licensed under the Sustainable Use License 1.0.
|
|
4
4
|
# You may not use this file except in compliance with the License.
|
|
5
5
|
# See the LICENSE file in the repository root.
|
|
6
6
|
#
|
|
7
|
-
# SPDX-License-Identifier: LicenseRef-
|
|
7
|
+
# SPDX-License-Identifier: LicenseRef-Sustainable-Use-1.0
|
|
8
8
|
|
|
9
9
|
from __future__ import annotations
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Copyright (c) 2026 Super Durable, Inc.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the
|
|
3
|
+
# Licensed under the Sustainable Use License 1.0.
|
|
4
4
|
# You may not use this file except in compliance with the License.
|
|
5
5
|
# See the LICENSE file in the repository root.
|
|
6
6
|
#
|
|
7
|
-
# SPDX-License-Identifier: LicenseRef-
|
|
7
|
+
# SPDX-License-Identifier: LicenseRef-Sustainable-Use-1.0
|
|
8
8
|
|
|
9
9
|
from __future__ import annotations
|
|
10
10
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Copyright (c) 2026 Super Durable, Inc.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the
|
|
3
|
+
# Licensed under the Sustainable Use License 1.0.
|
|
4
4
|
# You may not use this file except in compliance with the License.
|
|
5
5
|
# See the LICENSE file in the repository root.
|
|
6
6
|
#
|
|
7
|
-
# SPDX-License-Identifier: LicenseRef-
|
|
7
|
+
# SPDX-License-Identifier: LicenseRef-Sustainable-Use-1.0
|
|
8
8
|
|
|
9
9
|
from __future__ import annotations
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# Modifications Copyright (c) 2026 Super Durable, Inc.
|
|
5
5
|
#
|
|
6
6
|
# Modifications after the Legacy Cutoff are licensed under the
|
|
7
|
-
#
|
|
7
|
+
# Sustainable Use License 1.0.
|
|
8
8
|
# Legacy Materials remain under their original licenses.
|
|
9
9
|
# See LICENSE and LEGACY_NOTICES.md.
|
|
10
10
|
|
|
@@ -23,6 +23,7 @@ from dex._utils import require_name
|
|
|
23
23
|
from dex._value_mapper import ValueMapper
|
|
24
24
|
from dex._worker_dispatcher import WorkerDispatcher
|
|
25
25
|
from dex.attribute import Attribute, AttributeMap, _apply_attribute_store_sync
|
|
26
|
+
from dex.attribute_match import AttributeMatch, _encode_attribute_match
|
|
26
27
|
from dex.blob_cache import BlobCache
|
|
27
28
|
from dex.channel import Channel, ChannelMap, ChannelMessage
|
|
28
29
|
from dex.client_options import ClientOptions
|
|
@@ -1043,131 +1044,137 @@ class AsyncClient:
|
|
|
1043
1044
|
)
|
|
1044
1045
|
|
|
1045
1046
|
@overload
|
|
1046
|
-
async def
|
|
1047
|
+
async def wait_for_attribute_match(
|
|
1047
1048
|
self,
|
|
1048
1049
|
flow_id: str,
|
|
1049
1050
|
attribute: Attribute[ValueT],
|
|
1050
|
-
|
|
1051
|
+
match: AttributeMatch[ValueT],
|
|
1051
1052
|
timeout: timedelta,
|
|
1052
|
-
) ->
|
|
1053
|
-
"""Await a singleton Attribute in the current run
|
|
1053
|
+
) -> ValueT:
|
|
1054
|
+
"""Await a singleton Attribute in the current run satisfying ``match``.
|
|
1054
1055
|
|
|
1055
|
-
The Client
|
|
1056
|
-
``ValueError`` before transport. A remote
|
|
1057
|
-
``LongPollTimeoutError``.
|
|
1056
|
+
The Client returns the value observed by the successful wait. JSON,
|
|
1057
|
+
bytes, and null operands raise ``ValueError`` before transport. A remote
|
|
1058
|
+
expiry raises ``LongPollTimeoutError``.
|
|
1058
1059
|
|
|
1059
1060
|
Args:
|
|
1060
1061
|
flow_id: The non-empty active Flow ID.
|
|
1061
1062
|
attribute: The registered singleton Attribute to observe.
|
|
1062
|
-
|
|
1063
|
+
match: The scalar predicate to await.
|
|
1063
1064
|
timeout: The non-negative server-side wait duration.
|
|
1064
1065
|
|
|
1066
|
+
Returns:
|
|
1067
|
+
The current Attribute value that satisfied ``match``.
|
|
1068
|
+
|
|
1065
1069
|
Raises:
|
|
1066
|
-
ValueError: If an identifier, timeout, or
|
|
1067
|
-
LongPollTimeoutError: If
|
|
1070
|
+
ValueError: If an identifier, timeout, or match operand is invalid.
|
|
1071
|
+
LongPollTimeoutError: If the match is not observed before ``timeout``.
|
|
1068
1072
|
FlowNotActiveError: If the Flow closes first.
|
|
1069
1073
|
DexServiceError: If FlowService cannot perform the wait.
|
|
1070
1074
|
"""
|
|
1071
1075
|
...
|
|
1072
1076
|
|
|
1073
1077
|
@overload
|
|
1074
|
-
async def
|
|
1078
|
+
async def wait_for_attribute_match(
|
|
1075
1079
|
self,
|
|
1076
1080
|
flow_id: str,
|
|
1077
1081
|
attribute: AttributeMap[ValueT],
|
|
1078
1082
|
instance: str,
|
|
1079
|
-
|
|
1083
|
+
match: AttributeMatch[ValueT],
|
|
1080
1084
|
timeout: timedelta,
|
|
1081
|
-
) ->
|
|
1082
|
-
"""Await one AttributeMap instance in the current run.
|
|
1085
|
+
) -> ValueT:
|
|
1086
|
+
"""Await one AttributeMap instance in the current run satisfying a match.
|
|
1083
1087
|
|
|
1084
|
-
|
|
1085
|
-
|
|
1088
|
+
Match restrictions, request-ID generation, timeout behavior, and service
|
|
1089
|
+
errors match :meth:`wait_for_attribute_match`.
|
|
1086
1090
|
|
|
1087
1091
|
Args:
|
|
1088
1092
|
flow_id: The non-empty active Flow ID.
|
|
1089
1093
|
attribute: The registered AttributeMap to observe.
|
|
1090
1094
|
instance: The map instance to observe. Slash is prohibited because it is a reserved character.
|
|
1091
|
-
|
|
1095
|
+
match: The scalar predicate to await.
|
|
1092
1096
|
timeout: The non-negative server-side wait duration.
|
|
1093
1097
|
|
|
1098
|
+
Returns:
|
|
1099
|
+
The current AttributeMap value that satisfied ``match``.
|
|
1100
|
+
|
|
1094
1101
|
Raises:
|
|
1095
|
-
ValueError: If an identifier, timeout, or
|
|
1096
|
-
LongPollTimeoutError: If
|
|
1102
|
+
ValueError: If an identifier, timeout, or match operand is invalid.
|
|
1103
|
+
LongPollTimeoutError: If the match is not observed before ``timeout``.
|
|
1097
1104
|
FlowNotActiveError: If the Flow closes first.
|
|
1098
1105
|
DexServiceError: If FlowService cannot perform the wait.
|
|
1099
1106
|
"""
|
|
1100
1107
|
...
|
|
1101
1108
|
|
|
1102
|
-
async def
|
|
1109
|
+
async def wait_for_attribute_match(
|
|
1103
1110
|
self,
|
|
1104
1111
|
flow_id: str,
|
|
1105
1112
|
attribute: Attribute[Any] | AttributeMap[Any],
|
|
1106
1113
|
*args: object,
|
|
1107
1114
|
**kwargs: object,
|
|
1108
|
-
) ->
|
|
1109
|
-
"""Await a singleton Attribute or AttributeMap instance
|
|
1115
|
+
) -> Any:
|
|
1116
|
+
"""Await a singleton Attribute or AttributeMap instance satisfying a match.
|
|
1110
1117
|
|
|
1111
|
-
Singleton form is ``
|
|
1112
|
-
timeout)``; map form adds ``instance`` before ``
|
|
1118
|
+
Singleton form is ``wait_for_attribute_match(flow_id, attribute, match,
|
|
1119
|
+
timeout)``; map form adds ``instance`` before ``match``.
|
|
1113
1120
|
|
|
1114
1121
|
Args:
|
|
1115
1122
|
flow_id: The non-empty active Flow ID.
|
|
1116
1123
|
attribute: The registered Attribute or AttributeMap to observe.
|
|
1117
|
-
*args: Positional
|
|
1124
|
+
*args: Positional match and timeout, optionally preceded by a map instance.
|
|
1118
1125
|
**kwargs: The same arguments supplied by name.
|
|
1119
1126
|
|
|
1127
|
+
Returns:
|
|
1128
|
+
The current value that satisfied the match.
|
|
1129
|
+
|
|
1120
1130
|
Raises:
|
|
1121
1131
|
TypeError: If arguments do not match the Attribute definition.
|
|
1122
1132
|
ValueError: If an identifier, timeout, or expected value is invalid.
|
|
1123
|
-
LongPollTimeoutError: If
|
|
1133
|
+
LongPollTimeoutError: If the match is not observed before the timeout.
|
|
1124
1134
|
FlowNotActiveError: If the Flow closes first.
|
|
1125
1135
|
DexServiceError: If FlowService cannot perform the wait.
|
|
1126
1136
|
"""
|
|
1127
|
-
instance,
|
|
1137
|
+
instance, match, timeout = self._attribute_wait_arguments(
|
|
1128
1138
|
attribute, args, kwargs
|
|
1129
1139
|
)
|
|
1130
|
-
await self.
|
|
1131
|
-
flow_id, attribute, instance,
|
|
1140
|
+
return await self._wait_for_attribute_match(
|
|
1141
|
+
flow_id, attribute, instance, match, timeout
|
|
1132
1142
|
)
|
|
1133
1143
|
|
|
1134
|
-
async def
|
|
1144
|
+
async def _wait_for_attribute_match(
|
|
1135
1145
|
self,
|
|
1136
1146
|
flow_id: str,
|
|
1137
1147
|
attribute: Attribute[Any] | AttributeMap[Any],
|
|
1138
1148
|
instance: str | None,
|
|
1139
|
-
|
|
1149
|
+
match: object,
|
|
1140
1150
|
timeout: timedelta,
|
|
1141
|
-
) ->
|
|
1142
|
-
|
|
1143
|
-
|
|
1151
|
+
) -> Any:
|
|
1152
|
+
encoded_match = _encode_attribute_match(
|
|
1153
|
+
cast(AttributeMatch[Any], match),
|
|
1154
|
+
self._values,
|
|
1144
1155
|
self._values.codec(attribute.value_type),
|
|
1145
1156
|
)
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
self._service.WaitForAttribute,
|
|
1157
|
-
pb.WaitForAttributeRequest(
|
|
1158
|
-
flow_id=require_name(flow_id),
|
|
1159
|
-
condition=pb.WaitForAttributeCondition(
|
|
1160
|
-
equal=pb.WaitForAttributeEqual(
|
|
1161
|
-
key=self._definition_name(attribute, instance),
|
|
1162
|
-
value=encoded,
|
|
1163
|
-
)
|
|
1157
|
+
encoded_match.key = self._definition_name(attribute, instance)
|
|
1158
|
+
response = cast(
|
|
1159
|
+
pb.WaitForAttributeResponse,
|
|
1160
|
+
await self._call(
|
|
1161
|
+
self._service.WaitForAttribute,
|
|
1162
|
+
pb.WaitForAttributeRequest(
|
|
1163
|
+
flow_id=require_name(flow_id),
|
|
1164
|
+
match=encoded_match,
|
|
1165
|
+
wait_time_seconds=self._seconds32(timeout),
|
|
1166
|
+
request_id=str(uuid4()),
|
|
1164
1167
|
),
|
|
1165
|
-
|
|
1166
|
-
|
|
1168
|
+
"wait_for_attribute_match",
|
|
1169
|
+
flow_id,
|
|
1170
|
+
"active",
|
|
1167
1171
|
),
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
"
|
|
1172
|
+
)
|
|
1173
|
+
if not response.HasField("matched_value"):
|
|
1174
|
+
raise ValueError("wait_for_attribute_match response is incomplete")
|
|
1175
|
+
return self._values.decode(
|
|
1176
|
+
response.matched_value,
|
|
1177
|
+
self._values.codec(attribute.value_type),
|
|
1171
1178
|
)
|
|
1172
1179
|
|
|
1173
1180
|
async def update_flow_config(self, flow_id: str, config: FlowConfig) -> None:
|
|
@@ -1411,29 +1418,29 @@ class AsyncClient:
|
|
|
1411
1418
|
) -> tuple[str | None, object, timedelta]:
|
|
1412
1419
|
parameter_names: tuple[str, ...]
|
|
1413
1420
|
if isinstance(definition, Attribute):
|
|
1414
|
-
parameter_names = ("
|
|
1421
|
+
parameter_names = ("match", "timeout")
|
|
1415
1422
|
elif isinstance(definition, AttributeMap):
|
|
1416
|
-
parameter_names = ("instance", "
|
|
1423
|
+
parameter_names = ("instance", "match", "timeout")
|
|
1417
1424
|
else:
|
|
1418
|
-
raise TypeError("
|
|
1425
|
+
raise TypeError("wait_for_attribute_match received invalid arguments")
|
|
1419
1426
|
if len(args) > len(parameter_names):
|
|
1420
|
-
raise TypeError("
|
|
1427
|
+
raise TypeError("wait_for_attribute_match received invalid arguments")
|
|
1421
1428
|
arguments = dict(zip(parameter_names, args))
|
|
1422
1429
|
for name, value in kwargs.items():
|
|
1423
1430
|
if name not in parameter_names or name in arguments:
|
|
1424
|
-
raise TypeError("
|
|
1431
|
+
raise TypeError("wait_for_attribute_match received invalid arguments")
|
|
1425
1432
|
arguments[name] = value
|
|
1426
1433
|
if set(arguments) != set(parameter_names):
|
|
1427
|
-
raise TypeError("
|
|
1434
|
+
raise TypeError("wait_for_attribute_match received invalid arguments")
|
|
1428
1435
|
timeout = arguments["timeout"]
|
|
1429
1436
|
if not isinstance(timeout, timedelta):
|
|
1430
|
-
raise TypeError("
|
|
1437
|
+
raise TypeError("wait_for_attribute_match received invalid arguments")
|
|
1431
1438
|
if isinstance(definition, Attribute):
|
|
1432
|
-
return None, arguments["
|
|
1439
|
+
return None, arguments["match"], timeout
|
|
1433
1440
|
instance = arguments["instance"]
|
|
1434
1441
|
if not isinstance(instance, str):
|
|
1435
|
-
raise TypeError("
|
|
1436
|
-
return instance, arguments["
|
|
1442
|
+
raise TypeError("wait_for_attribute_match received invalid arguments")
|
|
1443
|
+
return instance, arguments["match"], timeout
|
|
1437
1444
|
|
|
1438
1445
|
@staticmethod
|
|
1439
1446
|
def _resolve_timeout_policy(
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# Copyright (c) 2026 Super Durable, Inc.
|
|
2
2
|
#
|
|
3
|
-
# Licensed under the
|
|
3
|
+
# Licensed under the Sustainable Use License 1.0.
|
|
4
4
|
# You may not use this file except in compliance with the License.
|
|
5
5
|
# See the LICENSE file in the repository root.
|
|
6
6
|
#
|
|
7
|
-
# SPDX-License-Identifier: LicenseRef-
|
|
7
|
+
# SPDX-License-Identifier: LicenseRef-Sustainable-Use-1.0
|
|
8
8
|
|
|
9
9
|
from __future__ import annotations
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
# Modifications Copyright (c) 2026 Super Durable, Inc.
|
|
5
5
|
#
|
|
6
6
|
# Modifications after the Legacy Cutoff are licensed under the
|
|
7
|
-
#
|
|
7
|
+
# Sustainable Use License 1.0.
|
|
8
8
|
# Legacy Materials remain under their original licenses.
|
|
9
9
|
# See LICENSE and LEGACY_NOTICES.md.
|
|
10
10
|
|