-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathitems.py
More file actions
63 lines (55 loc) · 2.21 KB
/
Copy pathitems.py
File metadata and controls
63 lines (55 loc) · 2.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Copyright Amazon.com Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
from decimal import Decimal
simple_item_ddb = {
"partition_key": {"S": "test-key"},
"sort_key": {"N": "1"},
"attribute1": {"S": "encrypted value"},
"attribute2": {"S": "signed value"},
":attribute3": {"S": "unsigned value"},
}
simple_key_ddb = {"partition_key": simple_item_ddb["partition_key"], "sort_key": simple_item_ddb["sort_key"]}
simple_item_dict = {
"partition_key": "test-key",
"sort_key": 1,
"attribute1": "encrypted value",
"attribute2": "signed value",
":attribute3": "unsigned value",
}
simple_key_dict = {"partition_key": simple_item_dict["partition_key"], "sort_key": simple_item_dict["sort_key"]}
complex_item_ddb = {
"partition_key": {"S": "all-types-test"},
"sort_key": {"N": "1"},
"attribute1": {
"M": {
"string": {"S": "string value"},
"number": {"N": "123.45"},
"binary": {"B": b"binary data"},
"string_set": {"SS": ["value1", "value2"]},
"number_set": {"NS": ["1", "2", "3"]},
"binary_set": {"BS": [b"binary1", b"binary2"]},
"list": {"L": [{"S": "list item 1"}, {"N": "42"}, {"B": b"list binary"}]},
"map": {"M": {"nested_string": {"S": "nested value"}, "nested_number": {"N": "42"}}},
}
},
"attribute2": {"S": "signed value"},
":attribute3": {"S": "unsigned value"},
}
complex_key_ddb = {"partition_key": complex_item_ddb["partition_key"], "sort_key": complex_item_ddb["sort_key"]}
complex_item_dict = {
"partition_key": "all-types-test",
"sort_key": 1,
"attribute1": {
"string": "string value",
"number": Decimal("123.45"),
"binary": b"binary data",
"string_set": {"value1", "value2"},
"number_set": {Decimal("1"), 2, Decimal("3")},
"binary_set": {b"binary1", b"binary2"},
"list": ["list item 1", 42, b"list binary"],
"map": {"nested_string": "nested value", "nested_number": 42},
},
"attribute2": "signed value",
":attribute3": "unsigned value",
}
complex_key_dict = {"partition_key": complex_item_dict["partition_key"], "sort_key": complex_item_dict["sort_key"]}