awsimple 6.0.0__py3-none-any.whl → 7.1.0__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.

Potentially problematic release.


This version of awsimple might be problematic. Click here for more details.

awsimple/__version__.py CHANGED
@@ -1,7 +1,7 @@
1
1
  __application_name__ = "awsimple"
2
2
  __title__ = __application_name__
3
3
  __author__ = "abel"
4
- __version__ = "6.0.0"
4
+ __version__ = "7.1.0"
5
5
  __author_email__ = "j@abel.co"
6
6
  __url__ = "https://github.com/jamesabel/awsimple"
7
7
  __download_url__ = "https://github.com/jamesabel/awsimple"
awsimple/dynamodb.py CHANGED
@@ -154,6 +154,8 @@ def dict_to_dynamodb(input_value: Any, convert_images: bool = True, raise_except
154
154
  for k, v in input_value.items():
155
155
  if type(k) is int:
156
156
  k = str(k) # allow int as key since it is unambiguous (e.g. bool and float are ambiguous)
157
+ elif isinstance(k, Enum):
158
+ k = dict_to_dynamodb(k, False, raise_exception) # convert Enum, including StrEnum, etc. as keys
157
159
  resp[k] = dict_to_dynamodb(v, convert_images, raise_exception)
158
160
  elif type(input_value) is list or type(input_value) is tuple:
159
161
  # converts tuple to list
@@ -519,6 +521,7 @@ class DynamoDBAccess(CacheAccess):
519
521
  except ClientError as e:
520
522
  log.warning(e)
521
523
  if self.metadata_table is not None:
524
+ self.metadata_table.create_metadata_table()
522
525
  self.metadata_table.update_table_mtime()
523
526
 
524
527
  return created
@@ -957,6 +960,8 @@ class _DynamoDBMetadataTable(DynamoDBAccess):
957
960
  self.mtime_f_string = "mtime_f"
958
961
  self.mtime_human_string = "mtime_human"
959
962
  super().__init__(metadata_table_name, **kwargs)
963
+
964
+ def create_metadata_table(self):
960
965
  self.create_table(partition_key=self.primary_partition_key, sort_key=self.primary_sort_key, partition_key_type=str, sort_key_type=str)
961
966
 
962
967
  def update_table_mtime(self):
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: awsimple
3
- Version: 6.0.0
3
+ Version: 7.1.0
4
4
  Summary: Simple AWS API for S3, DynamoDB, SNS, and SQS
5
5
  Home-page: https://github.com/jamesabel/awsimple
6
6
  Download-URL: https://github.com/jamesabel/awsimple
@@ -85,6 +85,9 @@ Full documentation available on [Read the Docs](https://awsimple.readthedocs.io/
85
85
 
86
86
  - DynamoDB full table scans (with local cache option that only rescans if the table has changed).
87
87
 
88
+ - Convert back and forth between DynamoDB items and Python dictionaries automatically. Converts many common data types to DynamoDB compatible types,
89
+ including nested structures, sets, images (PIL), and Enum/StrEnum.
90
+
88
91
  - True file hashing (SHA512) for S3 files (S3's etag is not a true file hash).
89
92
 
90
93
  - Supports moto mock and localstack. Handy for testing and CI.
@@ -1,8 +1,8 @@
1
1
  awsimple/__init__.py,sha256=1uECRpVL5WHv1HPyn9sKQpEMJHwlbb7vhkEv7cuS5C4,1053
2
- awsimple/__version__.py,sha256=fkIKzxizC4RTJMw-JGHdn_etsHyWAnkoUeWNC-Ty-Sg,323
2
+ awsimple/__version__.py,sha256=1A-B4QbDeFGUPq2AstlwwVmN7Fr-JYhTLgSgwsLBmYA,323
3
3
  awsimple/aws.py,sha256=NbRu1v_J5j2-pcefNZ5Xggii3mM9nHpeHMz9L9K9r-U,7653
4
4
  awsimple/cache.py,sha256=_LvPx76215t8KhAJOin6Pe2b4lWpB6kbKpdzgR4FeA4,7206
5
- awsimple/dynamodb.py,sha256=7MNxAutOCMTS4JSX-DLOwzaImJ2TzIc7kfQzQPAy5y8,41193
5
+ awsimple/dynamodb.py,sha256=yZarOgtWwQXkpG3Zj1eH86ytMYs5xmkipo_JBNGwLzA,41443
6
6
  awsimple/dynamodb_miv.py,sha256=4xPxQDYkIM-BVDGyAre6uqwJHsxguEbHbof8ztt-V7g,4645
7
7
  awsimple/exceptions.py,sha256=Ew-S8YkHVWrZFI_Yik5n0cJ7Ss4Kig5JsEPQ-9z18SU,922
8
8
  awsimple/logs.py,sha256=s9FhdDFWjfxGCVDx-FNTPgJ-YN1AOAgz4HNxTVfRARE,4108
@@ -13,9 +13,9 @@ awsimple/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  awsimple/s3.py,sha256=OhWF1uv4oLmBF5jAhKIi918iUQxx4CX8bTEvQ5wLYr8,24050
14
14
  awsimple/sns.py,sha256=T_FyN8eSmBPo213HOfB3UBlMrvtBK768IaRo_ks-7do,3526
15
15
  awsimple/sqs.py,sha256=nS_rD38gJObYeoXkDSg8Dv5jZTlxc79VRHFbVfmseis,17376
16
- awsimple-6.0.0.dist-info/licenses/LICENSE,sha256=d956YAgtDaxgxQmccyUk__EfhORZyBjvmJ8pq6zYTxk,1093
17
- awsimple-6.0.0.dist-info/licenses/LICENSE.txt,sha256=d956YAgtDaxgxQmccyUk__EfhORZyBjvmJ8pq6zYTxk,1093
18
- awsimple-6.0.0.dist-info/METADATA,sha256=jaIG-lKNlcttMgVSC0ZDnGAqe-CSxRbhWcmCuLtsZAU,6660
19
- awsimple-6.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
- awsimple-6.0.0.dist-info/top_level.txt,sha256=mwqCoH_8vAaK6iYioiRbasXmVCQM7AK3grNWOKp2VHE,9
21
- awsimple-6.0.0.dist-info/RECORD,,
16
+ awsimple-7.1.0.dist-info/licenses/LICENSE,sha256=d956YAgtDaxgxQmccyUk__EfhORZyBjvmJ8pq6zYTxk,1093
17
+ awsimple-7.1.0.dist-info/licenses/LICENSE.txt,sha256=d956YAgtDaxgxQmccyUk__EfhORZyBjvmJ8pq6zYTxk,1093
18
+ awsimple-7.1.0.dist-info/METADATA,sha256=Hr9h90Nq9xKsD6krG7SQprjXP1Ia1EPfooj03FpZjZ8,6880
19
+ awsimple-7.1.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
20
+ awsimple-7.1.0.dist-info/top_level.txt,sha256=mwqCoH_8vAaK6iYioiRbasXmVCQM7AK3grNWOKp2VHE,9
21
+ awsimple-7.1.0.dist-info/RECORD,,