boto3-assist 0.1.0__tar.gz → 0.1.1__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.
Files changed (68) hide show
  1. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/PKG-INFO +2 -2
  2. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/README.md +1 -1
  3. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/devops/build.py +7 -3
  4. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/devops/readme.md +3 -1
  5. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/pyproject.toml +1 -1
  6. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/src/boto3_assist/dynamodb/dynamodb_helpers.py +24 -11
  7. boto3_assist-0.1.1/src/boto3_assist/version.py +1 -0
  8. boto3_assist-0.1.0/setup__.py +0 -38
  9. boto3_assist-0.1.0/src/boto3_assist/version.py +0 -1
  10. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/.env.development +0 -0
  11. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/.env.docker +0 -0
  12. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/.env.docker.001 +0 -0
  13. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/.env.docker.nosql.workbench +0 -0
  14. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/.gitignore +0 -0
  15. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/.vscode/launch.json +0 -0
  16. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/.vscode/settings.json +0 -0
  17. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/.vscode/tasks.json +0 -0
  18. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/LICENSE-EXPLAINED.txt +0 -0
  19. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/LICENSE.txt +0 -0
  20. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/examples/__init__.py +0 -0
  21. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/examples/dynamodb/models/order_item.py +0 -0
  22. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/examples/dynamodb/models/order_model.py +0 -0
  23. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/examples/dynamodb/models/user_model.py +0 -0
  24. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/examples/dynamodb/models/user_post_model.py +0 -0
  25. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/examples/dynamodb/order_example/main.py +0 -0
  26. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/examples/dynamodb/services/order_item_service.py +0 -0
  27. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/examples/dynamodb/services/order_service.py +0 -0
  28. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/examples/dynamodb/services/table_service.py +0 -0
  29. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/examples/dynamodb/services/user_post_service.py +0 -0
  30. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/examples/dynamodb/services/user_service.py +0 -0
  31. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/examples/dynamodb/services/user_service_client_example.py +0 -0
  32. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/examples/dynamodb/services/user_service_resource_example.py +0 -0
  33. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/examples/dynamodb/user_post_example/main.py +0 -0
  34. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/module-headers.txt +0 -0
  35. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/mypy.ini +0 -0
  36. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/requirements-dev.txt +0 -0
  37. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/requirements.txt +0 -0
  38. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/run-checks.sh +0 -0
  39. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/src/boto3_assist/__init__.py +0 -0
  40. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/src/boto3_assist/boto3session.py +0 -0
  41. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/src/boto3_assist/dynamodb/dynamodb.py +0 -0
  42. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/src/boto3_assist/dynamodb/dynamodb_connection.py +0 -0
  43. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/src/boto3_assist/dynamodb/dynamodb_connection_tracker.py +0 -0
  44. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/src/boto3_assist/dynamodb/dynamodb_importer.py +0 -0
  45. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/src/boto3_assist/dynamodb/dynamodb_index.py +0 -0
  46. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/src/boto3_assist/dynamodb/dynamodb_iservice.py +0 -0
  47. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/src/boto3_assist/dynamodb/dynamodb_key.py +0 -0
  48. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/src/boto3_assist/dynamodb/dynamodb_model_base.py +0 -0
  49. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/src/boto3_assist/dynamodb/dynamodb_model_base_interfaces.py +0 -0
  50. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/src/boto3_assist/dynamodb/dynamodb_reindexer.py +0 -0
  51. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/src/boto3_assist/dynamodb/readme.md +0 -0
  52. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/src/boto3_assist/dynamodb/troubleshooting.md +0 -0
  53. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/src/boto3_assist/environment_services/__init__.py +0 -0
  54. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/src/boto3_assist/environment_services/environment_loader.py +0 -0
  55. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/src/boto3_assist/environment_services/environment_variables.py +0 -0
  56. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/src/boto3_assist/utilities/datetime_utility.py +0 -0
  57. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/src/boto3_assist/utilities/logging_utility.py +0 -0
  58. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/src/boto3_assist/utilities/serialization_utility.py +0 -0
  59. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/src/boto3_assist/utilities/string_utility.py +0 -0
  60. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/tests/__init__.py +0 -0
  61. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/tests/__top/__init__.py +0 -0
  62. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/tests/dynamodb/__init__.py +0 -0
  63. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/tests/dynamodb/dynamodb_model_base_test.py +0 -0
  64. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/tests/dynamodb/dynamodb_reindex_test.py +0 -0
  65. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/tests/examples_test/__init__.py +0 -0
  66. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/tests/examples_test/user_service_test.py +0 -0
  67. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/tests/utilities/__init__.py +0 -0
  68. {boto3_assist-0.1.0 → boto3_assist-0.1.1}/tests/utilities/serialization_utility_test.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: boto3_assist
3
- Version: 0.1.0
3
+ Version: 0.1.1
4
4
  Summary: Additional boto3 wrappers to make your life a little easier
5
5
  Author-email: Eric Wilson <boto3-assist@geekcafe.com>
6
6
  License-File: LICENSE-EXPLAINED.txt
@@ -40,7 +40,7 @@ environment vars first and then load your session.
40
40
 
41
41
  ## DyamoDB model mapping and Key Generation
42
42
  It's a light weight mapping tool to turn your python classes / object models to DynamoDB items that are ready
43
- for saving. See the examples directory for more information.
43
+ for saving. See the [examples](https://github.com/geekcafe/boto3-assist/tree/main/examples) directory in the repo for more information.
44
44
 
45
45
 
46
46
  ```sh
@@ -16,7 +16,7 @@ environment vars first and then load your session.
16
16
 
17
17
  ## DyamoDB model mapping and Key Generation
18
18
  It's a light weight mapping tool to turn your python classes / object models to DynamoDB items that are ready
19
- for saving. See the examples directory for more information.
19
+ for saving. See the [examples](https://github.com/geekcafe/boto3-assist/tree/main/examples) directory in the repo for more information.
20
20
 
21
21
 
22
22
  ```sh
@@ -69,11 +69,15 @@ def run_publish():
69
69
  """publish to code artifact"""
70
70
 
71
71
  # Set up the environment variables for the upload command
72
+ api_token = os.getenv("PYPI_API_TOKEN")
73
+
74
+ if not api_token:
75
+ raise ValueError("PYPI_API_TOKEN environment variable is not set.")
76
+
72
77
  env = os.environ.copy()
73
78
  env["TWINE_USERNAME"] = "__token__"
74
- env["TWINE_PASSWORD"] = (
75
- "pypi-AgEIcHlwaS5vcmcCJGQ0Zjk3ODRmLTgxZDMtNDViNy1iN2QwLWZkZDQzNTEyY2UwMgACKlszLCI3YzZmZTIzYS04MDVkLTQ0YjYtODlkZS04YTJiODJiNjBmMDQiXQAABiBxfnzdKtx6gff_FbuwKKV8D4b7XkUJJESxSqU1_mkCRA"
76
- )
79
+ env["TWINE_PASSWORD"] = api_token
80
+
77
81
  run_commands(
78
82
  ["python", "-m", "twine", "upload", "dist/*"],
79
83
  env=env,
@@ -20,4 +20,6 @@ twine upload --repository-url https://test.pypi.org/legacy/ dist/*
20
20
 
21
21
  pip install --index-url https://test.pypi.org/simple/ boto3-assist
22
22
 
23
- ```
23
+ ```
24
+
25
+ pypi-AgEIcHlwaS5vcmcCJGQ0Zjk3ODRmLTgxZDMtNDViNy1iN2QwLWZkZDQzNTEyY2UwMgACKlszLCI3YzZmZTIzYS04MDVkLTQ0YjYtODlkZS04YTJiODJiNjBmMDQiXQAABiBxfnzdKtx6gff_FbuwKKV8D4b7XkUJJESxSqU1_mkCRA
@@ -7,7 +7,7 @@ packages = ["src/boto3_assist"]
7
7
 
8
8
  [project]
9
9
  name = "boto3_assist"
10
- version = "0.1.0"
10
+ version = "0.1.1"
11
11
  authors = [
12
12
  { name="Eric Wilson", email="boto3-assist@geekcafe.com" }
13
13
  ]
@@ -142,24 +142,37 @@ class DynamoDBHelpers:
142
142
  Wraps Up Some usefull information when dealing with
143
143
 
144
144
  """
145
- response: dict[str, List] = {"Items": [], "Batches": []}
145
+ response: dict[str, Any] = {"Items": [], "Batches": []}
146
146
  record_start: int = 0
147
+ total_count = 0
148
+ total_scanned_count = 0
149
+ record_end = 0
147
150
  for item in collection:
148
151
  record_start += 1
149
- record_end = record_start + len(collection)
152
+ record_end = record_end + len(item["Items"])
150
153
  response["Items"].extend(item["Items"])
151
- response["Batches"].append(
152
- {
153
- "LastKey": item["LastKey"],
154
- "Count": item["Count"],
155
- "Scanned": item["Scanned"],
156
- "MoreRecords": item["MoreRecords"],
157
- "Records": {"start": record_start, "end": record_end},
158
- }
159
- )
154
+
155
+ batch: dict[str, Any] = {}
156
+ if "LastEvaluatedKey" in item:
157
+ batch["LastKey"] = item["LastEvaluatedKey"]
158
+
159
+ if "Count" in item:
160
+ batch["Count"] = item["Count"]
161
+ total_count += item["Count"]
162
+
163
+ if "ScannedCount" in item:
164
+ batch["ScannedCount"] = item["ScannedCount"]
165
+ total_scanned_count += item["ScannedCount"]
166
+
167
+ batch["Records"] = {"start": record_start, "end": record_end}
168
+
169
+ response["Batches"].append(batch)
160
170
 
161
171
  record_start = record_end
162
172
 
173
+ response["Count"] = total_count
174
+ response["ScannedCount"] = total_scanned_count
175
+
163
176
  return response
164
177
 
165
178
  @staticmethod
@@ -0,0 +1 @@
1
+ __version__ = '0.1.1'
@@ -1,38 +0,0 @@
1
- from setuptools import setup, find_packages
2
-
3
-
4
- def read_readme() -> str:
5
- """Read the readme"""
6
- with open("README.md", "r", encoding="utf-8") as fh:
7
- long_description = fh.read()
8
- return long_description
9
-
10
-
11
- setup(
12
- name="boto3-assist",
13
- version="0.1.0",
14
- author="Eric Wilson",
15
- author_email="boto3-assist@geekcafe.com",
16
- description="Additional boto3 wrappers to make your life a little easier",
17
- long_description=read_readme(),
18
- long_description_content_type="text/markdown",
19
- url="https://github.com/geekcafe/boto3-assist",
20
- packages=find_packages(),
21
- classifiers=[
22
- "Programming Language :: Python :: 3",
23
- "License :: OSI Approved :: MIT License",
24
- "Operating System :: OS Independent",
25
- ],
26
- python_requires=">=3.10",
27
- install_requires=[
28
- "aws-lambda-powertools",
29
- "aws-xray-sdk",
30
- "boto3",
31
- "jsons",
32
- "python-dateutil",
33
- "python-dotenv",
34
- "pytz",
35
- "requests",
36
- "types-python-dateutil",
37
- ],
38
- )
@@ -1 +0,0 @@
1
- __version__ = '0.1.0'
File without changes
File without changes
File without changes
File without changes
File without changes