boto3-assist 0.1.13__py3-none-any.whl → 0.1.14__py3-none-any.whl
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.
- boto3_assist/dynamodb/dynamodb_key.py +3 -1
- boto3_assist/dynamodb/dynamodb_model_base.py +22 -2
- boto3_assist/dynamodb/dynamodb_reserved_words.py +1 -1
- boto3_assist/version.py +1 -1
- {boto3_assist-0.1.13.dist-info → boto3_assist-0.1.14.dist-info}/METADATA +1 -1
- {boto3_assist-0.1.13.dist-info → boto3_assist-0.1.14.dist-info}/RECORD +9 -9
- {boto3_assist-0.1.13.dist-info → boto3_assist-0.1.14.dist-info}/WHEEL +0 -0
- {boto3_assist-0.1.13.dist-info → boto3_assist-0.1.14.dist-info}/licenses/LICENSE-EXPLAINED.txt +0 -0
- {boto3_assist-0.1.13.dist-info → boto3_assist-0.1.14.dist-info}/licenses/LICENSE.txt +0 -0
|
@@ -64,13 +64,21 @@ class DynamoDBModelBase:
|
|
|
64
64
|
@exclude_from_serialization
|
|
65
65
|
def projection_expression(self) -> str | None:
|
|
66
66
|
"""Gets the projection expression"""
|
|
67
|
+
prop_list: List[str] = []
|
|
67
68
|
if self.__projection_expression is None and self.auto_generate_projections:
|
|
68
69
|
props = self.to_dictionary()
|
|
69
70
|
# turn props to a list[str]
|
|
70
71
|
prop_list = list(props.keys())
|
|
72
|
+
else:
|
|
73
|
+
if self.__projection_expression:
|
|
74
|
+
prop_list = self.__projection_expression.split(",")
|
|
75
|
+
prop_list = [p.strip() for p in prop_list]
|
|
76
|
+
|
|
77
|
+
if len(prop_list) == 0:
|
|
78
|
+
return None
|
|
71
79
|
|
|
72
|
-
|
|
73
|
-
|
|
80
|
+
transformed_list = self.__reserved_words.tranform_projections(prop_list)
|
|
81
|
+
self.projection_expression = ",".join(transformed_list)
|
|
74
82
|
|
|
75
83
|
return self.__projection_expression
|
|
76
84
|
|
|
@@ -105,6 +113,12 @@ class DynamoDBModelBase:
|
|
|
105
113
|
self.projection_expression_attribute_names = (
|
|
106
114
|
self.__reserved_words.transform_attributes(prop_list)
|
|
107
115
|
)
|
|
116
|
+
else:
|
|
117
|
+
if self.projection_expression:
|
|
118
|
+
expression_list = self.projection_expression.replace("#", "").split(",")
|
|
119
|
+
self.projection_expression_attribute_names = (
|
|
120
|
+
self.__reserved_words.transform_attributes(expression_list)
|
|
121
|
+
)
|
|
108
122
|
|
|
109
123
|
return self.__projection_expression_attribute_names
|
|
110
124
|
|
|
@@ -325,6 +339,8 @@ class DynamoDBSerializer:
|
|
|
325
339
|
|
|
326
340
|
# Add instance variables
|
|
327
341
|
for attr, value in instance.__dict__.items():
|
|
342
|
+
if str(attr) == "T":
|
|
343
|
+
continue
|
|
328
344
|
# don't get the private properties
|
|
329
345
|
if not str(attr).startswith("_"):
|
|
330
346
|
if value is not None or include_none:
|
|
@@ -346,6 +362,10 @@ class DynamoDBSerializer:
|
|
|
346
362
|
if exclude:
|
|
347
363
|
continue
|
|
348
364
|
|
|
365
|
+
# Skip TypeVar T or instances of DynamoDBModelBase
|
|
366
|
+
if str(name) == "T":
|
|
367
|
+
continue
|
|
368
|
+
|
|
349
369
|
# don't get the private properties
|
|
350
370
|
if not str(name).startswith("_"):
|
|
351
371
|
value = getattr(instance, name)
|
|
@@ -31,7 +31,7 @@ class DynamoDBReservedWords:
|
|
|
31
31
|
if isinstance(projections, str):
|
|
32
32
|
projections = projections.split(",")
|
|
33
33
|
|
|
34
|
-
# any
|
|
34
|
+
# any projection that exists add a # infront of it
|
|
35
35
|
projections = ["#" + p if self.is_reserved_word(p) else p for p in projections]
|
|
36
36
|
return projections
|
|
37
37
|
|
boto3_assist/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '0.1.
|
|
1
|
+
__version__ = '0.1.14'
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
boto3_assist/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
boto3_assist/boto3session.py,sha256=J20E2lkqJOaey4Ohi-xRe2xABj7QsA8DrggzK29-5es,6415
|
|
3
3
|
boto3_assist/connection_tracker.py,sha256=ggCp2gQ7Y-2fHSGFk8QCHJz-Rq1yVNO4aRYgrYTP178,2987
|
|
4
|
-
boto3_assist/version.py,sha256=
|
|
4
|
+
boto3_assist/version.py,sha256=jS25etd3hy2cHfgFEhE4FguVWmkMUkiK9f6J-pRm10o,23
|
|
5
5
|
boto3_assist/dynamodb/dynamodb.py,sha256=vV0HvFCESnVK6BcAfcrWsMsNxIIsctvDX_3xdzOVCT0,14623
|
|
6
6
|
boto3_assist/dynamodb/dynamodb_connection.py,sha256=JMCmWOsMzy45rikGl3Z2xqlG2vUTEKSYqi6dpsfJ750,4418
|
|
7
7
|
boto3_assist/dynamodb/dynamodb_connection_tracker.py,sha256=0BWHRfi5_vjkJLuCSX6sYwvA6wc7BSYCQnGrzbhfyKA,404
|
|
@@ -9,11 +9,11 @@ boto3_assist/dynamodb/dynamodb_helpers.py,sha256=ajpTJ5bJOm9PDgE2Zx9p2zkTRFV4xsw
|
|
|
9
9
|
boto3_assist/dynamodb/dynamodb_importer.py,sha256=nCKsyRQeMqDSf0Q5mQ_X_oVIg4PRnu0hcUzZnBli610,3471
|
|
10
10
|
boto3_assist/dynamodb/dynamodb_index.py,sha256=LRQgSci222s-pU-JXgnaAoOa71ABX9h3uJPeCVPl1GE,6315
|
|
11
11
|
boto3_assist/dynamodb/dynamodb_iservice.py,sha256=2AuaKxt7DUZbB-GpBBtPtPMpAlgZkumkAldm8vy7-sg,701
|
|
12
|
-
boto3_assist/dynamodb/dynamodb_key.py,sha256=
|
|
13
|
-
boto3_assist/dynamodb/dynamodb_model_base.py,sha256=
|
|
12
|
+
boto3_assist/dynamodb/dynamodb_key.py,sha256=YD7o1EUlwVBQ55p9YCTKqAUU_np4nqtLIHnmp-BeolM,1803
|
|
13
|
+
boto3_assist/dynamodb/dynamodb_model_base.py,sha256=WOEQiwEWEVndWIXiBk7_hTaRWb-KyKWPpT5-2xKCCxI,14260
|
|
14
14
|
boto3_assist/dynamodb/dynamodb_model_base_interfaces.py,sha256=yT4zDRI8vP15WVOHnCvY3FsEy_QSIta5-bnUby70Xow,747
|
|
15
15
|
boto3_assist/dynamodb/dynamodb_reindexer.py,sha256=bCj6KIU0fQOgjkkiq9yF51PFZZr4Y9Lu3-hPlmsPG0Y,6164
|
|
16
|
-
boto3_assist/dynamodb/dynamodb_reserved_words.py,sha256=
|
|
16
|
+
boto3_assist/dynamodb/dynamodb_reserved_words.py,sha256=g89wImXxxOYodCJN7g4NkZPYPdXMCsRUBgA7A2KoFZw,1789
|
|
17
17
|
boto3_assist/dynamodb/dynamodb_reserved_words.txt,sha256=CanugFPh7rpgJ_jH9k4t8ANycrZJWTjT09sWiW4LC68,4137
|
|
18
18
|
boto3_assist/dynamodb/readme.md,sha256=wNMzdRwk0qRV0kE88UUYnJos3pEK0HNjEIVkq2PATf8,1490
|
|
19
19
|
boto3_assist/dynamodb/troubleshooting.md,sha256=uGpBaBUt_MyzjzwFOLOe0udTgcvaOpiTFxfj7ilLNkM,136
|
|
@@ -25,8 +25,8 @@ boto3_assist/utilities/datetime_utility.py,sha256=TbqGQkJDTahqvaZAIV550nhYnW1Bsq
|
|
|
25
25
|
boto3_assist/utilities/logging_utility.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
26
|
boto3_assist/utilities/serialization_utility.py,sha256=s_QQRIhtwIE7xN5nU13mNk2wtWyErBX_Sg7n0gbHj-M,4308
|
|
27
27
|
boto3_assist/utilities/string_utility.py,sha256=w8l063UT3GE48tuJopETyZrjG4CgAzWkyDWMAYMg5Og,7432
|
|
28
|
-
boto3_assist-0.1.
|
|
29
|
-
boto3_assist-0.1.
|
|
30
|
-
boto3_assist-0.1.
|
|
31
|
-
boto3_assist-0.1.
|
|
32
|
-
boto3_assist-0.1.
|
|
28
|
+
boto3_assist-0.1.14.dist-info/METADATA,sha256=UKvxqMxon3FMzhMXZ0OLPqHQ7aV6IEFiMdc_F7DvjMA,1805
|
|
29
|
+
boto3_assist-0.1.14.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
30
|
+
boto3_assist-0.1.14.dist-info/licenses/LICENSE-EXPLAINED.txt,sha256=WFREvTpfTjPjDHpOLADxJpCKpIla3Ht87RUUGii4ODU,606
|
|
31
|
+
boto3_assist-0.1.14.dist-info/licenses/LICENSE.txt,sha256=PXDhFWS5L5aOTkVhNvoitHKbAkgxqMI2uUPQyrnXGiI,1105
|
|
32
|
+
boto3_assist-0.1.14.dist-info/RECORD,,
|
|
File without changes
|
{boto3_assist-0.1.13.dist-info → boto3_assist-0.1.14.dist-info}/licenses/LICENSE-EXPLAINED.txt
RENAMED
|
File without changes
|
|
File without changes
|