boto3-assist 0.1.6__py3-none-any.whl → 0.1.7__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_model_base.py +7 -1
- boto3_assist/dynamodb/dynamodb_reserved_words.py +6 -4
- boto3_assist/version.py +1 -1
- {boto3_assist-0.1.6.dist-info → boto3_assist-0.1.7.dist-info}/METADATA +1 -1
- {boto3_assist-0.1.6.dist-info → boto3_assist-0.1.7.dist-info}/RECORD +8 -8
- {boto3_assist-0.1.6.dist-info → boto3_assist-0.1.7.dist-info}/WHEEL +0 -0
- {boto3_assist-0.1.6.dist-info → boto3_assist-0.1.7.dist-info}/licenses/LICENSE-EXPLAINED.txt +0 -0
- {boto3_assist-0.1.6.dist-info → boto3_assist-0.1.7.dist-info}/licenses/LICENSE.txt +0 -0
|
@@ -48,7 +48,7 @@ class DynamoDBModelBase:
|
|
|
48
48
|
self.__helpers: DynamoDBHelpers | None = None
|
|
49
49
|
self.__indexes: DynamoDBIndexes | None = None
|
|
50
50
|
self.__reserved_words: DynamoDBReservedWords = DynamoDBReservedWords()
|
|
51
|
-
self.
|
|
51
|
+
self.__auto_generate_projections: bool = auto_generate_projections
|
|
52
52
|
|
|
53
53
|
@property
|
|
54
54
|
@exclude_from_serialization
|
|
@@ -74,6 +74,12 @@ class DynamoDBModelBase:
|
|
|
74
74
|
|
|
75
75
|
return self.__projection_expression
|
|
76
76
|
|
|
77
|
+
@property
|
|
78
|
+
@exclude_from_serialization
|
|
79
|
+
def auto_generate_projections(self) -> bool:
|
|
80
|
+
"""Gets the auto generate projections"""
|
|
81
|
+
return self.__auto_generate_projections
|
|
82
|
+
|
|
77
83
|
@projection_expression.setter
|
|
78
84
|
def projection_expression(self, value: str | None):
|
|
79
85
|
self.__projection_expression = value
|
|
@@ -35,11 +35,13 @@ class DynamoDBReservedWords:
|
|
|
35
35
|
projections = ["#" + p if self.is_reserved_word(p) else p for p in projections]
|
|
36
36
|
return projections
|
|
37
37
|
|
|
38
|
-
def transform_attributes(self,
|
|
38
|
+
def transform_attributes(self, projections: List[str] | str) -> dict:
|
|
39
39
|
"""Transforms a dict of attributes to remove reserved words"""
|
|
40
40
|
transformed_attributes: dict | None = {}
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
if isinstance(projections, str):
|
|
42
|
+
projections = projections.split(",")
|
|
43
|
+
for item in projections:
|
|
44
|
+
if self.is_reserved_word(item):
|
|
45
|
+
transformed_attributes["#" + item] = item
|
|
44
46
|
|
|
45
47
|
return transformed_attributes
|
boto3_assist/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = '0.1.
|
|
1
|
+
__version__ = '0.1.7'
|
|
@@ -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=WYRdDSozJlxbFY_oYQAlGRpDgFWsF_nAiN7CIzh_yVo,2637
|
|
4
|
-
boto3_assist/version.py,sha256=
|
|
4
|
+
boto3_assist/version.py,sha256=mFY0GwwuN-a3M8w93_mskS6GZIvv9SNdjLfJaWNsm-I,22
|
|
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=nTNQ99sIidDoLMhMbBju2umgLmcttsmnvmd_DMy_J9M,1582
|
|
@@ -10,10 +10,10 @@ boto3_assist/dynamodb/dynamodb_importer.py,sha256=nCKsyRQeMqDSf0Q5mQ_X_oVIg4PRnu
|
|
|
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
12
|
boto3_assist/dynamodb/dynamodb_key.py,sha256=X3I3gUPx2T858vjRDi9SN8qn8ez5UJUo0vZiKBeeUWg,1776
|
|
13
|
-
boto3_assist/dynamodb/dynamodb_model_base.py,sha256=
|
|
13
|
+
boto3_assist/dynamodb/dynamodb_model_base.py,sha256=KXsQ9E11o5mRPjD79qSsBp8ebee81-dLoFD0YGn2580,12561
|
|
14
14
|
boto3_assist/dynamodb/dynamodb_model_base_interfaces.py,sha256=yT4zDRI8vP15WVOHnCvY3FsEy_QSIta5-bnUby70Xow,747
|
|
15
15
|
boto3_assist/dynamodb/dynamodb_reindexer.py,sha256=_I-W7Ply-82fRHnhsRZuquRYxEIXubuWGq7E7B4Pa7I,6204
|
|
16
|
-
boto3_assist/dynamodb/dynamodb_reserved_words.py,sha256=
|
|
16
|
+
boto3_assist/dynamodb/dynamodb_reserved_words.py,sha256=BwBA8i2Rtc9k-whyGBXZFEDAX2PpmydAbOhK31TwPSA,1718
|
|
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.7.dist-info/METADATA,sha256=LL3fZQnr7EtmQ_3FWWxv2hvxLY-c6oD2F5_cvP6hCp0,1804
|
|
29
|
+
boto3_assist-0.1.7.dist-info/WHEEL,sha256=1yFddiXMmvYK7QYTqtRNtX66WJ0Mz8PYEiEUoOUUxRY,87
|
|
30
|
+
boto3_assist-0.1.7.dist-info/licenses/LICENSE-EXPLAINED.txt,sha256=WFREvTpfTjPjDHpOLADxJpCKpIla3Ht87RUUGii4ODU,606
|
|
31
|
+
boto3_assist-0.1.7.dist-info/licenses/LICENSE.txt,sha256=PXDhFWS5L5aOTkVhNvoitHKbAkgxqMI2uUPQyrnXGiI,1105
|
|
32
|
+
boto3_assist-0.1.7.dist-info/RECORD,,
|
|
File without changes
|
{boto3_assist-0.1.6.dist-info → boto3_assist-0.1.7.dist-info}/licenses/LICENSE-EXPLAINED.txt
RENAMED
|
File without changes
|
|
File without changes
|