boto3-assist 0.5.1__py3-none-any.whl → 0.5.2__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.
@@ -5,7 +5,7 @@ MIT License. See Project Root for the license information.
5
5
  """
6
6
 
7
7
  from __future__ import annotations
8
- from typing import TypeVar
8
+ from typing import TypeVar, Dict, Any
9
9
  from boto3_assist.utilities.serialization_utility import Serialization
10
10
 
11
11
 
@@ -14,8 +14,12 @@ class SerializableModel:
14
14
 
15
15
  T = TypeVar("T", bound="SerializableModel")
16
16
 
17
- @staticmethod
18
- def map(source: dict | object, target: T, coerce: bool = True) -> T:
17
+ def __init__(self):
18
+ pass
19
+
20
+ def map(
21
+ self: T, source: Dict[str, Any] | SerializableModel | None, coerce: bool = True
22
+ ) -> T:
19
23
  """
20
24
  Map the source dictionary to the target object.
21
25
 
@@ -23,7 +27,7 @@ class SerializableModel:
23
27
  - source: The dictionary to map from.
24
28
  - target: The object to map to.
25
29
  """
26
- mapped = Serialization.map(source, target, coerce=coerce)
30
+ mapped = Serialization.map(source=source, target=self, coerce=coerce)
27
31
  if mapped is None:
28
32
  raise ValueError("Unable to map source to target")
29
33
 
boto3_assist/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = '0.5.1'
1
+ __version__ = '0.5.2'
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: boto3_assist
3
- Version: 0.5.1
3
+ Version: 0.5.2
4
4
  Summary: Additional boto3 wrappers to make your life a little easier
5
5
  Author-email: Eric Wilson <boto3-assist@geekcafe.com>
6
6
  License-File: LICENSE-EXPLAINED.txt
@@ -3,7 +3,7 @@ boto3_assist/boto3session.py,sha256=Q9sByNC0r_aMQfHnIEnxtTaiCMUqikm8UeSTxV7-Np0,
3
3
  boto3_assist/connection.py,sha256=CNGkAIRyfrELoWrV0ziQBA3oHacNFuLL3i8faUPRiO0,3486
4
4
  boto3_assist/connection_tracker.py,sha256=bfImvNVX-0Lhb-ombOurWUpNLdI0qVDil-kokBdIFkY,4345
5
5
  boto3_assist/http_status_codes.py,sha256=G0zRSWenwavYKETvDF9tNVUXQz3Ae2gXdBETYbjvJe8,3284
6
- boto3_assist/version.py,sha256=s8Yq9Om1yBxrMA7xYQ5Y13Paeuxnq99NxhyjuPlnH6A,22
6
+ boto3_assist/version.py,sha256=pIxUWQG2brcif6SJXtn4CcMr6f5oY-6lwZ_FJEilJwQ,22
7
7
  boto3_assist/aws_lambda/event_info.py,sha256=OkZ4WzuGaHEu_T8sB188KBgShAJhZpWASALKRGBOhMg,14648
8
8
  boto3_assist/cloudwatch/cloudwatch_connection.py,sha256=mnGWaLSQpHh5EeY7Ek_2o9JKHJxOELIYtQVMX1IaHn4,2480
9
9
  boto3_assist/cloudwatch/cloudwatch_connection_tracker.py,sha256=mzRtO1uHrcfJNh1XrGEiXdTqxwEP8d1RqJkraMNkgK0,410
@@ -34,7 +34,7 @@ boto3_assist/environment_services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeR
34
34
  boto3_assist/environment_services/environment_loader.py,sha256=zCA4mRdVWMLKzjDRvrJbhQfRVP4HAMGpuQFi07zzULk,3396
35
35
  boto3_assist/environment_services/environment_variables.py,sha256=4ccBKdPt6O7hcRT3zBHd8vqu8yQU8udmoD5RLAT3iMs,6801
36
36
  boto3_assist/errors/custom_exceptions.py,sha256=zC2V2Y4PUtKj3uLPn8mB-JessksKWJWvKM9kp1dmvt8,760
37
- boto3_assist/models/serializable_model.py,sha256=8CunaU2YDWs9vK2BShShnyAdktmeZ3R_o7p8Yt70nYQ,829
37
+ boto3_assist/models/serializable_model.py,sha256=j77RJD3o5euqwWek2IpvqdG6quf5yvoY-_NMvYTOBaE,912
38
38
  boto3_assist/s3/s3.py,sha256=DFCJs5z1mMIT8nZfnqPyr_cvhi9-FePuYH--tzD7b5E,17104
39
39
  boto3_assist/s3/s3_connection.py,sha256=FI1AhZV4UbTXQRTb4TqL9mv88Gt018rPZVFBvLetVAw,2163
40
40
  boto3_assist/utilities/datetime_utility.py,sha256=dgAMB9VqakrYIPXlSoVQiLSsc_yhrJK4gMfJO9mX90w,11112
@@ -45,8 +45,8 @@ boto3_assist/utilities/logging_utility.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
45
45
  boto3_assist/utilities/numbers_utility.py,sha256=KIiNkBSRbfNWvtXG5SdHp625LTiW12VtADUa4ZlWMFo,8709
46
46
  boto3_assist/utilities/serialization_utility.py,sha256=p9QQfc6EDOtD-mB6Ujhv-BRpDn3DCCG2z5VmXG1kmb0,7768
47
47
  boto3_assist/utilities/string_utility.py,sha256=sBY80aQO-fTRanlHryZFMQBxdo6OvLRvnZjZrQepHlI,9283
48
- boto3_assist-0.5.1.dist-info/METADATA,sha256=r5iNwKDiUS06CIskAGuHnpvW3wXfD97QznVQhe07jWQ,1728
49
- boto3_assist-0.5.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
50
- boto3_assist-0.5.1.dist-info/licenses/LICENSE-EXPLAINED.txt,sha256=WFREvTpfTjPjDHpOLADxJpCKpIla3Ht87RUUGii4ODU,606
51
- boto3_assist-0.5.1.dist-info/licenses/LICENSE.txt,sha256=PXDhFWS5L5aOTkVhNvoitHKbAkgxqMI2uUPQyrnXGiI,1105
52
- boto3_assist-0.5.1.dist-info/RECORD,,
48
+ boto3_assist-0.5.2.dist-info/METADATA,sha256=Pb5bNBGK2wy_4Pcw806qrDytmaOySGqKrd8LWVc6iEM,1728
49
+ boto3_assist-0.5.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
50
+ boto3_assist-0.5.2.dist-info/licenses/LICENSE-EXPLAINED.txt,sha256=WFREvTpfTjPjDHpOLADxJpCKpIla3Ht87RUUGii4ODU,606
51
+ boto3_assist-0.5.2.dist-info/licenses/LICENSE.txt,sha256=PXDhFWS5L5aOTkVhNvoitHKbAkgxqMI2uUPQyrnXGiI,1105
52
+ boto3_assist-0.5.2.dist-info/RECORD,,