my-aws-helpers 1.5.0__tar.gz → 1.7.0__tar.gz
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 my-aws-helpers might be problematic. Click here for more details.
- {my_aws_helpers-1.5.0 → my_aws_helpers-1.7.0}/PKG-INFO +1 -1
- my_aws_helpers-1.7.0/my_aws_helpers/logging.py +14 -0
- {my_aws_helpers-1.5.0 → my_aws_helpers-1.7.0}/my_aws_helpers/s3.py +2 -1
- {my_aws_helpers-1.5.0 → my_aws_helpers-1.7.0}/my_aws_helpers.egg-info/PKG-INFO +1 -1
- {my_aws_helpers-1.5.0 → my_aws_helpers-1.7.0}/my_aws_helpers.egg-info/SOURCES.txt +1 -0
- my_aws_helpers-1.7.0/setup.cfg +13 -0
- {my_aws_helpers-1.5.0 → my_aws_helpers-1.7.0}/setup.py +1 -1
- my_aws_helpers-1.5.0/setup.cfg +0 -17
- {my_aws_helpers-1.5.0 → my_aws_helpers-1.7.0}/README.md +0 -0
- {my_aws_helpers-1.5.0 → my_aws_helpers-1.7.0}/my_aws_helpers/api.py +0 -0
- {my_aws_helpers-1.5.0 → my_aws_helpers-1.7.0}/my_aws_helpers/cognito.py +0 -0
- {my_aws_helpers-1.5.0 → my_aws_helpers-1.7.0}/my_aws_helpers/dynamo.py +0 -0
- {my_aws_helpers-1.5.0 → my_aws_helpers-1.7.0}/my_aws_helpers/errors.py +0 -0
- {my_aws_helpers-1.5.0 → my_aws_helpers-1.7.0}/my_aws_helpers/sfn.py +0 -0
- {my_aws_helpers-1.5.0 → my_aws_helpers-1.7.0}/my_aws_helpers.egg-info/dependency_links.txt +0 -0
- {my_aws_helpers-1.5.0 → my_aws_helpers-1.7.0}/my_aws_helpers.egg-info/requires.txt +0 -0
- {my_aws_helpers-1.5.0 → my_aws_helpers-1.7.0}/my_aws_helpers.egg-info/top_level.txt +0 -0
- {my_aws_helpers-1.5.0 → my_aws_helpers-1.7.0}/my_aws_helpers.egg-info/zip-safe +0 -0
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
import os
|
|
3
|
+
|
|
4
|
+
def select_powertools_logger(service_name: str) -> logging.Logger:
|
|
5
|
+
"""
|
|
6
|
+
Returns the powertools logger if it can be found,
|
|
7
|
+
Returns a Logger with name = service_name if powertools logger is not found
|
|
8
|
+
"""
|
|
9
|
+
existing_loggers = [name for name in logging.root.manager.loggerDict]
|
|
10
|
+
powertools_service_name = os.environ.get("POWERTOOLS_SERVICE_NAME")
|
|
11
|
+
if powertools_service_name is not None:
|
|
12
|
+
logger = logging.getLogger(powertools_service_name) if powertools_service_name in existing_loggers else None
|
|
13
|
+
if logger: return logger
|
|
14
|
+
return logging.getLogger(service_name)
|
|
@@ -102,7 +102,8 @@ class S3:
|
|
|
102
102
|
obj.put(Body = file_contents, ContentType = content_type, ContentEncoding = content_encoding)
|
|
103
103
|
return S3Location(bucket=bucket_name, file_name=file_name)
|
|
104
104
|
|
|
105
|
-
def read_binary_from_s3(self,
|
|
105
|
+
def read_binary_from_s3(self, s3_location: S3Location) -> bytes:
|
|
106
|
+
obj = self.client.Object(s3_location.bucket, s3_location.file_name)
|
|
106
107
|
d_bytes = io.BytesIO()
|
|
107
108
|
obj.download_fileobj(d_bytes)
|
|
108
109
|
d_bytes.seek(0)
|
my_aws_helpers-1.5.0/setup.cfg
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
[metadata]
|
|
2
|
-
description_file = README.md
|
|
3
|
-
|
|
4
|
-
[wheel]
|
|
5
|
-
universal = 1
|
|
6
|
-
|
|
7
|
-
[coverage:run]
|
|
8
|
-
omit = venv/*, tests/*
|
|
9
|
-
|
|
10
|
-
[pypi]
|
|
11
|
-
username = __token__
|
|
12
|
-
password = pypi-AgEIcHlwaS5vcmcCJDA2Y2E1MDgwLWYxZDUtNDFiNC1hZTI2LWM0OTM3YmY1ZmMzMgACKlszLCI4MWNjYWU2Yi1iNmQ2LTQyZTUtYWM0NS1hZTdiMjgyOGFkYzUiXQAABiAWnJVh45AKFTUtPaXbFuZmkWDbDdc04yEwlFyGxFedPw
|
|
13
|
-
|
|
14
|
-
[egg_info]
|
|
15
|
-
tag_build =
|
|
16
|
-
tag_date = 0
|
|
17
|
-
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|