awsimple 7.0.0__py3-none-any.whl → 7.1.1__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 +1 -1
- awsimple/dynamodb.py +6 -1
- awsimple/pubsub.py +1 -1
- {awsimple-7.0.0.dist-info → awsimple-7.1.1.dist-info}/METADATA +4 -1
- {awsimple-7.0.0.dist-info → awsimple-7.1.1.dist-info}/RECORD +9 -9
- {awsimple-7.0.0.dist-info → awsimple-7.1.1.dist-info}/WHEEL +0 -0
- {awsimple-7.0.0.dist-info → awsimple-7.1.1.dist-info}/licenses/LICENSE +0 -0
- {awsimple-7.0.0.dist-info → awsimple-7.1.1.dist-info}/licenses/LICENSE.txt +0 -0
- {awsimple-7.0.0.dist-info → awsimple-7.1.1.dist-info}/top_level.txt +0 -0
awsimple/__version__.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
__application_name__ = "awsimple"
|
|
2
2
|
__title__ = __application_name__
|
|
3
3
|
__author__ = "abel"
|
|
4
|
-
__version__ = "7.
|
|
4
|
+
__version__ = "7.1.1"
|
|
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
|
|
@@ -384,7 +386,10 @@ class DynamoDBAccess(CacheAccess):
|
|
|
384
386
|
if now <= getmtime(str(cache_file_path)) + self.cache_life:
|
|
385
387
|
# cache file exists and is current, see if it has expired
|
|
386
388
|
cache_file_mtime = getmtime(str(cache_file_path))
|
|
387
|
-
|
|
389
|
+
if self.metadata_table is None:
|
|
390
|
+
table_mtime_f = None
|
|
391
|
+
else:
|
|
392
|
+
table_mtime_f = self.metadata_table.get_table_mtime_f()
|
|
388
393
|
log.info(f"{self.table_name=},{cache_file_path=},{cache_file_mtime=},{table_mtime_f=}")
|
|
389
394
|
# determine if table has been updated since local cache file was written
|
|
390
395
|
# (assumes the clock of the system that wrote the table is in sync with the clock of this system within the clock skew)
|
awsimple/pubsub.py
CHANGED
|
@@ -273,7 +273,7 @@ class _PubSub(Thread):
|
|
|
273
273
|
@typechecked()
|
|
274
274
|
def get_messages(self) -> List[Dict[str, Any]]:
|
|
275
275
|
"""
|
|
276
|
-
Get all available messages.
|
|
276
|
+
Get all available messages. Use set sub_poll=True when creating the PubSub object to use this function.
|
|
277
277
|
|
|
278
278
|
:return: list of messages as dictionaries
|
|
279
279
|
"""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: awsimple
|
|
3
|
-
Version: 7.
|
|
3
|
+
Version: 7.1.1
|
|
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,21 +1,21 @@
|
|
|
1
1
|
awsimple/__init__.py,sha256=1uECRpVL5WHv1HPyn9sKQpEMJHwlbb7vhkEv7cuS5C4,1053
|
|
2
|
-
awsimple/__version__.py,sha256=
|
|
2
|
+
awsimple/__version__.py,sha256=14FvzNmdYzQW8P4pO4uSFPWi0eQpdxJiYhiTn_VsRm8,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=
|
|
5
|
+
awsimple/dynamodb.py,sha256=nyj05FZlzdrzFSsCroHGkDLJwrtr6jz5J1dhDEDPr8c,41561
|
|
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
|
|
9
9
|
awsimple/mock.py,sha256=eScbnxFF9xAosOAsL-NZgp_P-fezB6StQMkb85Y3TNo,574
|
|
10
10
|
awsimple/platform.py,sha256=TObvLIVgRGh-Mh4ZCxFfxAmrn8KNMHktr6XkDZX8JYE,376
|
|
11
|
-
awsimple/pubsub.py,sha256=
|
|
11
|
+
awsimple/pubsub.py,sha256=wJtINXLhEfXHgzpp-ddFxsOs4R36EePDCECl6MCsPGI,13999
|
|
12
12
|
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-7.
|
|
17
|
-
awsimple-7.
|
|
18
|
-
awsimple-7.
|
|
19
|
-
awsimple-7.
|
|
20
|
-
awsimple-7.
|
|
21
|
-
awsimple-7.
|
|
16
|
+
awsimple-7.1.1.dist-info/licenses/LICENSE,sha256=d956YAgtDaxgxQmccyUk__EfhORZyBjvmJ8pq6zYTxk,1093
|
|
17
|
+
awsimple-7.1.1.dist-info/licenses/LICENSE.txt,sha256=d956YAgtDaxgxQmccyUk__EfhORZyBjvmJ8pq6zYTxk,1093
|
|
18
|
+
awsimple-7.1.1.dist-info/METADATA,sha256=o1J-eN6VacKquF9D61Nz7kFOWvkyohOrjID2FnHb9I0,6880
|
|
19
|
+
awsimple-7.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
20
|
+
awsimple-7.1.1.dist-info/top_level.txt,sha256=mwqCoH_8vAaK6iYioiRbasXmVCQM7AK3grNWOKp2VHE,9
|
|
21
|
+
awsimple-7.1.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|