awsimple 3.4.0__py3-none-any.whl → 3.6.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.
- awsimple/__version__.py +1 -1
- awsimple/aws.py +8 -8
- awsimple/cache.py +1 -1
- awsimple/dynamodb.py +2 -0
- awsimple/s3.py +1 -1
- {awsimple-3.4.0.dist-info → awsimple-3.6.1.dist-info}/METADATA +15 -2
- awsimple-3.6.1.dist-info/RECORD +18 -0
- {awsimple-3.4.0.dist-info → awsimple-3.6.1.dist-info}/WHEEL +1 -1
- awsimple-3.4.0.dist-info/RECORD +0 -18
- {awsimple-3.4.0.dist-info → awsimple-3.6.1.dist-info/licenses}/LICENSE +0 -0
- {awsimple-3.4.0.dist-info → awsimple-3.6.1.dist-info/licenses}/LICENSE.txt +0 -0
- {awsimple-3.4.0.dist-info → awsimple-3.6.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__ = "3.
|
|
4
|
+
__version__ = "3.6.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/aws.py
CHANGED
|
@@ -30,12 +30,12 @@ def boto_error_to_string(boto_error) -> Union[str, None]:
|
|
|
30
30
|
class AWSAccess:
|
|
31
31
|
@typechecked()
|
|
32
32
|
def __init__(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
self,
|
|
34
|
+
resource_name: Union[str, None] = None,
|
|
35
|
+
profile_name: Union[str, None] = None,
|
|
36
|
+
aws_access_key_id: Union[str, None] = None,
|
|
37
|
+
aws_secret_access_key: Union[str, None] = None,
|
|
38
|
+
region_name: Union[str, None] = None,
|
|
39
39
|
):
|
|
40
40
|
"""
|
|
41
41
|
AWSAccess - takes care of basic AWS access (e.g. session, client, resource), getting some basic AWS information, and mock support for testing.
|
|
@@ -113,8 +113,8 @@ class AWSAccess:
|
|
|
113
113
|
self.resource = None
|
|
114
114
|
else:
|
|
115
115
|
self.client = self.session.client(self.resource_name, config=self._get_config()) # type: ignore
|
|
116
|
-
if self.resource_name == "logs":
|
|
117
|
-
# logs don't have resource
|
|
116
|
+
if self.resource_name == "logs" or self.resource_name == "rds":
|
|
117
|
+
# logs and rds don't have a resource
|
|
118
118
|
self.resource = None
|
|
119
119
|
else:
|
|
120
120
|
self.resource = self.session.resource(self.resource_name, config=self._get_config()) # type: ignore
|
awsimple/cache.py
CHANGED
|
@@ -82,7 +82,7 @@ def lru_cache_write(new_data: Union[Path, bytes], cache_dir: Path, cache_file_na
|
|
|
82
82
|
least_recently_used_size = None
|
|
83
83
|
for file_path in cache_dir.rglob("*"):
|
|
84
84
|
access_time = os.path.getatime(file_path)
|
|
85
|
-
if least_recently_used_path is None or access_time < least_recently_used_access_time:
|
|
85
|
+
if least_recently_used_path is None or least_recently_used_access_time is None or access_time < least_recently_used_access_time:
|
|
86
86
|
least_recently_used_path = file_path
|
|
87
87
|
least_recently_used_access_time = access_time
|
|
88
88
|
least_recently_used_size = os.path.getsize(file_path)
|
awsimple/dynamodb.py
CHANGED
|
@@ -180,6 +180,8 @@ def dict_to_dynamodb(input_value: Any, convert_images: bool = True, raise_except
|
|
|
180
180
|
resp = image_byte_array.getvalue()
|
|
181
181
|
elif isinstance(input_value, datetime.datetime):
|
|
182
182
|
resp = input_value.isoformat()
|
|
183
|
+
elif isinstance(input_value, Path):
|
|
184
|
+
resp = input_value.as_posix()
|
|
183
185
|
else:
|
|
184
186
|
if raise_exception:
|
|
185
187
|
raise NotImplementedError(type(input_value), input_value)
|
awsimple/s3.py
CHANGED
|
@@ -20,7 +20,7 @@ from boto3.s3.transfer import TransferConfig
|
|
|
20
20
|
from s3transfer import S3UploadFailedError
|
|
21
21
|
import urllib3.exceptions
|
|
22
22
|
from typeguard import typechecked
|
|
23
|
-
from hashy import get_string_sha512, get_file_sha512, get_bytes_sha512, get_dls_sha512
|
|
23
|
+
from hashy import get_string_sha512, get_file_sha512, get_bytes_sha512, get_dls_sha512
|
|
24
24
|
from yasf import sf
|
|
25
25
|
|
|
26
26
|
from awsimple import CacheAccess, __application_name__, lru_cache_write, AWSimpleException, convert_serializable_special_cases
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: awsimple
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.6.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
|
|
@@ -22,6 +22,19 @@ Requires-Dist: tobool
|
|
|
22
22
|
Requires-Dist: urllib3
|
|
23
23
|
Requires-Dist: python-dateutil
|
|
24
24
|
Requires-Dist: yasf
|
|
25
|
+
Dynamic: author
|
|
26
|
+
Dynamic: author-email
|
|
27
|
+
Dynamic: description
|
|
28
|
+
Dynamic: description-content-type
|
|
29
|
+
Dynamic: download-url
|
|
30
|
+
Dynamic: home-page
|
|
31
|
+
Dynamic: keywords
|
|
32
|
+
Dynamic: license
|
|
33
|
+
Dynamic: license-file
|
|
34
|
+
Dynamic: project-url
|
|
35
|
+
Dynamic: requires-dist
|
|
36
|
+
Dynamic: requires-python
|
|
37
|
+
Dynamic: summary
|
|
25
38
|
|
|
26
39
|
|
|
27
40
|
<p align="center">
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
awsimple/__init__.py,sha256=8aFfqWFAvRPweoZkKncvHAW2ytTW_5-AJ0nnmYqgUBw,916
|
|
2
|
+
awsimple/__version__.py,sha256=jGiJ18Y9OeSn8YGis7tf4vYZ6ctQjR1W3uTiRheczhc,323
|
|
3
|
+
awsimple/aws.py,sha256=NbRu1v_J5j2-pcefNZ5Xggii3mM9nHpeHMz9L9K9r-U,7653
|
|
4
|
+
awsimple/cache.py,sha256=_LvPx76215t8KhAJOin6Pe2b4lWpB6kbKpdzgR4FeA4,7206
|
|
5
|
+
awsimple/dynamodb.py,sha256=8OlGbMg7uU1rpWbkjK9HdHMSfopRBrLb3AFALGgfLHg,39156
|
|
6
|
+
awsimple/dynamodb_miv.py,sha256=4xPxQDYkIM-BVDGyAre6uqwJHsxguEbHbof8ztt-V7g,4645
|
|
7
|
+
awsimple/logs.py,sha256=A2RmTT90pfFTthfENd7GSsEHSIBJXO8ICHPdA7sEsHY,4278
|
|
8
|
+
awsimple/mock.py,sha256=eScbnxFF9xAosOAsL-NZgp_P-fezB6StQMkb85Y3TNo,574
|
|
9
|
+
awsimple/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
+
awsimple/s3.py,sha256=ydYLDj51b38lYI6LsJlc4i0PDj2vnWBuSkzdRKcWAUg,23858
|
|
11
|
+
awsimple/sns.py,sha256=dOx3VUS04xxeG1krGudN4A5fqoIpXeHqXNkBvfbr_6Q,3292
|
|
12
|
+
awsimple/sqs.py,sha256=ejV9twP15X8-mZ9IHGEUlYWqufEcasYuPf1xlGQt2a8,15506
|
|
13
|
+
awsimple-3.6.1.dist-info/licenses/LICENSE,sha256=d956YAgtDaxgxQmccyUk__EfhORZyBjvmJ8pq6zYTxk,1093
|
|
14
|
+
awsimple-3.6.1.dist-info/licenses/LICENSE.txt,sha256=d956YAgtDaxgxQmccyUk__EfhORZyBjvmJ8pq6zYTxk,1093
|
|
15
|
+
awsimple-3.6.1.dist-info/METADATA,sha256=_pQy4RCP8b5GS1iuz3o-wHx_IQWxq0szAlXSrp40aNE,6377
|
|
16
|
+
awsimple-3.6.1.dist-info/WHEEL,sha256=DnLRTWE75wApRYVsjgc6wsVswC54sMSJhAEd4xhDpBk,91
|
|
17
|
+
awsimple-3.6.1.dist-info/top_level.txt,sha256=mwqCoH_8vAaK6iYioiRbasXmVCQM7AK3grNWOKp2VHE,9
|
|
18
|
+
awsimple-3.6.1.dist-info/RECORD,,
|
awsimple-3.4.0.dist-info/RECORD
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
awsimple/__init__.py,sha256=8aFfqWFAvRPweoZkKncvHAW2ytTW_5-AJ0nnmYqgUBw,916
|
|
2
|
-
awsimple/__version__.py,sha256=QeAaw-gHVlOTWxX7VxuppELAYFtQHcjChg8cH2N11_Q,323
|
|
3
|
-
awsimple/aws.py,sha256=n5Mte2l0uUyLtxHx-Cv2RdVF2H2pvNiQPlrwrwddKcc,7636
|
|
4
|
-
awsimple/cache.py,sha256=tdLeMw2IYW9Y4lGT2SAGUI7u_aTX_TFQs2udXcqW6fI,7163
|
|
5
|
-
awsimple/dynamodb.py,sha256=xVPnRdedm19ORpmC1G0fMaQMnf9D72Ebq2lXKSLgtmc,39076
|
|
6
|
-
awsimple/dynamodb_miv.py,sha256=4xPxQDYkIM-BVDGyAre6uqwJHsxguEbHbof8ztt-V7g,4645
|
|
7
|
-
awsimple/logs.py,sha256=A2RmTT90pfFTthfENd7GSsEHSIBJXO8ICHPdA7sEsHY,4278
|
|
8
|
-
awsimple/mock.py,sha256=eScbnxFF9xAosOAsL-NZgp_P-fezB6StQMkb85Y3TNo,574
|
|
9
|
-
awsimple/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
-
awsimple/s3.py,sha256=lwMS8Xr06TB2LkQ7z8yaK6pnH9oOFU3-DEI3Ba6dEwo,23874
|
|
11
|
-
awsimple/sns.py,sha256=dOx3VUS04xxeG1krGudN4A5fqoIpXeHqXNkBvfbr_6Q,3292
|
|
12
|
-
awsimple/sqs.py,sha256=ejV9twP15X8-mZ9IHGEUlYWqufEcasYuPf1xlGQt2a8,15506
|
|
13
|
-
awsimple-3.4.0.dist-info/LICENSE,sha256=d956YAgtDaxgxQmccyUk__EfhORZyBjvmJ8pq6zYTxk,1093
|
|
14
|
-
awsimple-3.4.0.dist-info/LICENSE.txt,sha256=d956YAgtDaxgxQmccyUk__EfhORZyBjvmJ8pq6zYTxk,1093
|
|
15
|
-
awsimple-3.4.0.dist-info/METADATA,sha256=nNYscDeRiwPL6X9UU36J7foOlyC9oiKUawl8VLdimGw,6087
|
|
16
|
-
awsimple-3.4.0.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
|
|
17
|
-
awsimple-3.4.0.dist-info/top_level.txt,sha256=mwqCoH_8vAaK6iYioiRbasXmVCQM7AK3grNWOKp2VHE,9
|
|
18
|
-
awsimple-3.4.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|