boto3-assist 0.9.0__tar.gz → 0.9.2__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.
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/PKG-INFO +1 -1
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/pyproject.toml +1 -1
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/environment_services/environment_loader.py +18 -1
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/utilities/serialization_utility.py +3 -0
- boto3_assist-0.9.2/src/boto3_assist/version.py +1 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/models/serializable_model_test.py +12 -1
- boto3_assist-0.9.0/src/boto3_assist/version.py +0 -1
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/.env.docker +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/.env.docker.001 +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/.env.docker.nosql.workbench +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/.env.unittest +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/.gitignore +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/.vscode/launch.json +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/.vscode/settings.json +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/.vscode/tasks.json +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/LICENSE-EXPLAINED.txt +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/LICENSE.txt +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/README.md +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/aws_regions_with_status.csv +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/aws_regions_with_status.json +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/devops/build.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/devops/readme.md +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/examples/__init__.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/examples/cloudwatch/log_report.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/examples/dynamodb/models/order_item_model.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/examples/dynamodb/models/order_model.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/examples/dynamodb/models/product_model.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/examples/dynamodb/models/user_model.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/examples/dynamodb/models/user_post_model.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/examples/dynamodb/order_example/main.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/examples/dynamodb/order_example/products.json +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/examples/dynamodb/services/order_item_service.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/examples/dynamodb/services/order_service.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/examples/dynamodb/services/product_service.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/examples/dynamodb/services/table_service.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/examples/dynamodb/services/user_post_service.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/examples/dynamodb/services/user_service.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/examples/dynamodb/services/user_service_client_example.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/examples/dynamodb/services/user_service_resource_example.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/examples/dynamodb/user_post_example/main.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/examples/ec2/regions_report.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/module-headers.txt +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/mypy.ini +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/requirements-dev.txt +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/requirements.txt +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/run-checks.sh +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/run_unit_tests.sh +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/__init__.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/aws_lambda/event_info.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/boto3session.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/cloudwatch/cloudwatch_connection.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/cloudwatch/cloudwatch_connection_tracker.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/cloudwatch/cloudwatch_log_connection.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/cloudwatch/cloudwatch_logs.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/cloudwatch/cloudwatch_query.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/cognito/cognito_authorizer.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/cognito/cognito_connection.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/cognito/cognito_utility.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/cognito/jwks_cache.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/cognito/user.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/connection.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/connection_tracker.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/dynamodb/dynamodb.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/dynamodb/dynamodb_connection.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/dynamodb/dynamodb_helpers.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/dynamodb/dynamodb_importer.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/dynamodb/dynamodb_index.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/dynamodb/dynamodb_iservice.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/dynamodb/dynamodb_key.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/dynamodb/dynamodb_model_base.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/dynamodb/dynamodb_model_base_interfaces.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/dynamodb/dynamodb_reindexer.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/dynamodb/dynamodb_reserved_words.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/dynamodb/dynamodb_reserved_words.txt +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/dynamodb/readme.md +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/dynamodb/troubleshooting.md +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/ec2/ec2_connection.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/environment_services/__init__.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/environment_services/environment_variables.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/errors/custom_exceptions.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/http_status_codes.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/models/serializable_model.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/s3/s3.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/s3/s3_bucket.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/s3/s3_connection.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/s3/s3_event_data.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/s3/s3_object.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/securityhub/securityhub.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/securityhub/securityhub_connection.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/utilities/datetime_utility.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/utilities/dictionaroy_utility.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/utilities/file_operations.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/utilities/http_utility.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/utilities/logging_utility.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/utilities/numbers_utility.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/utilities/string_utility.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/__init__.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/__top/__init__.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/dynamodb/__init__.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/dynamodb/dbmodels/cms/base.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/dynamodb/dbmodels/cms/content_block.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/dynamodb/dbmodels/cms/page.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/dynamodb/dbmodels/cms/template.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/dynamodb/dbmodels/simple_model.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/dynamodb/dbmodels/user_model.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/dynamodb/dbmodels/user_required_fields_model.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/dynamodb/dynamodb_model_base_test.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/dynamodb/dynamodb_model_projections_test.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/dynamodb/dynamodb_model_serializtion_test.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/dynamodb/dynamodb_moto_sorting_test.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/dynamodb/dynamodb_reindex_test.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/examples_test/__init__.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/examples_test/user_service_test.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/lambda/__init__.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/lambda/event_info_test.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/models/__init__.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/models/serializable_model_wide_test.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/s3/__init__.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/s3/files/test.txt +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/s3/s3_event_data_test.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/s3/s3_file_delete_test.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/s3/s3_file_upload_test.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/utilities/__init__.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/utilities/serialization_utility_test.py +0 -0
- {boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/utilities/string_utility_test.py +0 -0
|
@@ -5,7 +5,7 @@ MIT License. See Project Root for the license information.
|
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
7
|
import os
|
|
8
|
-
|
|
8
|
+
import json
|
|
9
9
|
from typing import List, Union, Optional, IO
|
|
10
10
|
from pathlib import Path
|
|
11
11
|
from dotenv import load_dotenv
|
|
@@ -109,3 +109,20 @@ class EnvironmentLoader:
|
|
|
109
109
|
)
|
|
110
110
|
|
|
111
111
|
return None
|
|
112
|
+
|
|
113
|
+
def load_event_file(self, full_path: str) -> dict:
|
|
114
|
+
"""Loads an AWS event file"""
|
|
115
|
+
if not os.path.exists(full_path):
|
|
116
|
+
raise RuntimeError(f"Failed to locate event file: {full_path}")
|
|
117
|
+
|
|
118
|
+
event = {}
|
|
119
|
+
with open(full_path, mode="r", encoding="utf-8") as json_file:
|
|
120
|
+
event = json.load(json_file)
|
|
121
|
+
|
|
122
|
+
if isinstance(event, dict) and "message" in event:
|
|
123
|
+
event = event.get("message", {})
|
|
124
|
+
|
|
125
|
+
if isinstance(event, dict) and "event" in event:
|
|
126
|
+
event = event.get("event", {})
|
|
127
|
+
|
|
128
|
+
return event
|
{boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/utilities/serialization_utility.py
RENAMED
|
@@ -275,6 +275,9 @@ class Serialization:
|
|
|
275
275
|
if coerce:
|
|
276
276
|
# Attempt to coerce the value to the expected type
|
|
277
277
|
try:
|
|
278
|
+
if isinstance(value, list) and expected_type is str:
|
|
279
|
+
value = "".join(value)
|
|
280
|
+
|
|
278
281
|
value = expected_type(value)
|
|
279
282
|
except ValueError as e:
|
|
280
283
|
logger.warning(
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '0.9.2'
|
|
@@ -5,7 +5,7 @@ MIT License. See Project Root for the license information.
|
|
|
5
5
|
"""
|
|
6
6
|
|
|
7
7
|
import unittest
|
|
8
|
-
from typing import Dict
|
|
8
|
+
from typing import Dict, List
|
|
9
9
|
from boto3_assist.models.serializable_model import SerializableModel
|
|
10
10
|
|
|
11
11
|
|
|
@@ -16,6 +16,15 @@ class ExampleModel(SerializableModel):
|
|
|
16
16
|
self.name = name
|
|
17
17
|
self.age = age
|
|
18
18
|
self.active = active
|
|
19
|
+
self.__pets: List[str] = []
|
|
20
|
+
|
|
21
|
+
@property
|
|
22
|
+
def pets(self) -> List[str]:
|
|
23
|
+
return self.__pets
|
|
24
|
+
|
|
25
|
+
@pets.setter
|
|
26
|
+
def pets(self, value: List[str]):
|
|
27
|
+
self.__pets = value
|
|
19
28
|
|
|
20
29
|
|
|
21
30
|
class TestSerializableModel(unittest.TestCase):
|
|
@@ -26,6 +35,7 @@ class TestSerializableModel(unittest.TestCase):
|
|
|
26
35
|
"name": "John Doe",
|
|
27
36
|
"age": 30,
|
|
28
37
|
"active": True,
|
|
38
|
+
"pets": ["abby", "lexie", "lena", "keisha"],
|
|
29
39
|
}
|
|
30
40
|
|
|
31
41
|
def test_map_valid_data(self):
|
|
@@ -37,6 +47,7 @@ class TestSerializableModel(unittest.TestCase):
|
|
|
37
47
|
self.assertEqual(result.name, "John Doe")
|
|
38
48
|
self.assertEqual(result.age, 30)
|
|
39
49
|
self.assertEqual(result.active, True)
|
|
50
|
+
self.assertEqual(len(result.pets), 4)
|
|
40
51
|
|
|
41
52
|
def test_map_partial_data(self):
|
|
42
53
|
"""
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '0.9.0'
|
|
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
|
|
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
|
|
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
|
{boto3_assist-0.9.0 → boto3_assist-0.9.2}/examples/dynamodb/services/user_service_client_example.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/cloudwatch/cloudwatch_connection.py
RENAMED
|
File without changes
|
|
File without changes
|
{boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/cloudwatch/cloudwatch_log_connection.py
RENAMED
|
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
|
|
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
|
{boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/dynamodb/dynamodb_reserved_words.py
RENAMED
|
File without changes
|
{boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/dynamodb/dynamodb_reserved_words.txt
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{boto3_assist-0.9.0 → boto3_assist-0.9.2}/src/boto3_assist/securityhub/securityhub_connection.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/dynamodb/dbmodels/user_required_fields_model.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{boto3_assist-0.9.0 → boto3_assist-0.9.2}/tests/dynamodb/dynamodb_model_serializtion_test.py
RENAMED
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|