aws-sdk-lambda 0.8.0__tar.gz → 0.10.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.
Files changed (28) hide show
  1. aws_sdk_lambda-0.10.0/.changes/0.10.0.json +8 -0
  2. aws_sdk_lambda-0.10.0/.changes/0.9.0.json +12 -0
  3. {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/.gitignore +1 -2
  4. {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/CHANGELOG.md +11 -0
  5. {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/Makefile +1 -1
  6. {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/PKG-INFO +4 -4
  7. {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/docs/README.md +1 -1
  8. {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/pyproject.toml +5 -6
  9. {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/scripts/docs/generate_doc_stubs.py +48 -10
  10. {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/src/aws_sdk_lambda/__init__.py +1 -1
  11. {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/src/aws_sdk_lambda/client.py +1839 -523
  12. {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/src/aws_sdk_lambda/config.py +103 -105
  13. {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/src/aws_sdk_lambda/models.py +1 -1
  14. {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/src/aws_sdk_lambda/user_agent.py +2 -2
  15. aws_sdk_lambda-0.8.0/tests/test_protocol.py → aws_sdk_lambda-0.10.0/tests/test_restjson_protocol.py +2 -0
  16. aws_sdk_lambda-0.10.0/zensical.toml +83 -0
  17. aws_sdk_lambda-0.8.0/docs/hooks/copyright.py +0 -6
  18. aws_sdk_lambda-0.8.0/mkdocs.yml +0 -96
  19. {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/.changes/0.8.0.json +0 -0
  20. {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/LICENSE +0 -0
  21. {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/NOTICE +0 -0
  22. {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/README.md +0 -0
  23. {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/docs/index.md +0 -0
  24. {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/docs/stylesheets/extra.css +0 -0
  25. {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/src/aws_sdk_lambda/_private/__init__.py +0 -0
  26. {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/src/aws_sdk_lambda/_private/schemas.py +0 -0
  27. {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/src/aws_sdk_lambda/auth.py +0 -0
  28. {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/tests/__init__.py +0 -0
@@ -0,0 +1,8 @@
1
+ {
2
+ "changes": [
3
+ {
4
+ "type": "dependency",
5
+ "description": "Bump `smithy-aws-core` from `~=0.9.0` to `~=0.10.0`."
6
+ }
7
+ ]
8
+ }
@@ -0,0 +1,12 @@
1
+ {
2
+ "changes": [
3
+ {
4
+ "type": "dependency",
5
+ "description": "Bump `smithy-core` from `~=0.7.0` to `~=0.8.0`."
6
+ },
7
+ {
8
+ "type": "dependency",
9
+ "description": "Bump `smithy-aws-core` from `~=0.8.0` to `~=0.9.0`."
10
+ }
11
+ ]
12
+ }
@@ -1,9 +1,8 @@
1
1
  # macOS system files
2
2
  .DS_Store
3
3
 
4
- # MkDocs build artifacts
4
+ # Docs build artifacts
5
5
  site/
6
- docs/SUMMARY.md
7
6
  docs/clients/
8
7
  **/docs/client/
9
8
 
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.10.0
4
+
5
+ ### Dependencies
6
+ * Bump `smithy-aws-core` from `~=0.9.0` to `~=0.10.0`.
7
+
8
+ ## v0.9.0
9
+
10
+ ### Dependencies
11
+ * Bump `smithy-core` from `~=0.7.0` to `~=0.8.0`.
12
+ * Bump `smithy-aws-core` from `~=0.8.0` to `~=0.9.0`.
13
+
3
14
  ## v0.8.0
4
15
 
5
16
  ### Features
@@ -18,7 +18,7 @@ docs-generate:
18
18
  uv run --no-sync python scripts/docs/generate_doc_stubs.py -c $(CLIENT_DIR) -o $(DOCS_OUTPUT_DIR)
19
19
 
20
20
  docs: docs-generate
21
- uv run --no-sync mkdocs build
21
+ uv run --no-sync zensical build
22
22
 
23
23
  docs-serve:
24
24
  @[ -d site ] || $(MAKE) docs
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.4
1
+ Metadata-Version: 2.5
2
2
  Name: aws_sdk_lambda
3
- Version: 0.8.0
3
+ Version: 0.10.0
4
4
  Summary: aws_sdk_lambda client
5
5
  License: Apache-2.0
6
6
  License-File: LICENSE
@@ -18,8 +18,8 @@ Classifier: Programming Language :: Python :: 3.12
18
18
  Classifier: Programming Language :: Python :: 3.13
19
19
  Classifier: Programming Language :: Python :: 3.14
20
20
  Requires-Python: >=3.12
21
- Requires-Dist: smithy-aws-core[eventstream,json]~=0.8.0
22
- Requires-Dist: smithy-core~=0.7.0
21
+ Requires-Dist: smithy-aws-core[eventstream,json]~=0.10.0
22
+ Requires-Dist: smithy-core~=0.8.0
23
23
  Requires-Dist: smithy-http[awscrt]~=0.4.0
24
24
  Description-Content-Type: text/markdown
25
25
 
@@ -1,6 +1,6 @@
1
1
  ## Generating Client Documentation
2
2
 
3
- Material for MkDocs is used for documentation. You can generate the documentation HTML
3
+ Zensical is used for documentation. You can generate the documentation HTML
4
4
  for this client locally with the following:
5
5
 
6
6
  ```bash
@@ -2,7 +2,7 @@
2
2
 
3
3
  [project]
4
4
  name = "aws_sdk_lambda"
5
- version = "0.8.0"
5
+ version = "0.10.0"
6
6
  description = "aws_sdk_lambda client"
7
7
  readme = "README.md"
8
8
  requires-python = ">=3.12"
@@ -23,16 +23,15 @@ classifiers = [
23
23
  ]
24
24
 
25
25
  dependencies = [
26
- "smithy_aws_core[eventstream, json]~=0.8.0",
27
- "smithy_core~=0.7.0",
26
+ "smithy_aws_core[eventstream, json]~=0.10.0",
27
+ "smithy_core~=0.8.0",
28
28
  "smithy_http[awscrt]~=0.4.0"
29
29
  ]
30
30
 
31
31
  [dependency-groups]
32
32
  docs = [
33
- "mkdocs==1.6.1",
34
- "mkdocs-material==9.7.0",
35
- "mkdocstrings[python]==1.0.0",
33
+ "mkdocstrings[python]~=1.0.4",
34
+ "zensical~=0.0.53",
36
35
  ]
37
36
  test = [
38
37
  "pytest>=9.0.1,<10.0.0",
@@ -1,13 +1,14 @@
1
1
  """
2
2
  Generate markdown API Reference stubs for AWS SDK for Python clients.
3
3
 
4
- This script generates MkDocs markdown stub files for a single client package.
4
+ This script generates markdown stub files for a single client package.
5
5
  It uses griffe to analyze the Python source and outputs mkdocstrings directives
6
6
  for the client, operations, models (structures, unions, enums), and errors.
7
7
  """
8
8
 
9
9
  import argparse
10
10
  import logging
11
+ import re
11
12
  import sys
12
13
  from collections.abc import Sequence
13
14
  from dataclasses import dataclass
@@ -115,19 +116,43 @@ class ClientInfo:
115
116
  class DocStubGenerator:
116
117
  """Generate markdown API Reference stubs for AWS SDK for Python clients."""
117
118
 
118
- def __init__(self, client_dir: Path, output_dir: Path) -> None:
119
+ def __init__(self, client_dir: Path, output_dir: Path, service_name: str | None = None) -> None:
119
120
  """
120
121
  Initialize the documentation generator.
121
122
 
122
123
  Args:
123
124
  client_dir: Path to the client source directory
124
125
  output_dir: Path to the output directory for generated doc stubs
126
+ service_name: Display name for the service (e.g. the Smithy sdkId
127
+ "SNS"). When omitted, falls back to a title-cased derivation of
128
+ the package name, which does not preserve acronym casing.
125
129
  """
126
130
  self.client_dir = client_dir
127
131
  self.output_dir = output_dir
128
- # Extract service name from package name
129
- # (e.g., "aws_sdk_bedrock_runtime" -> "Bedrock Runtime")
130
- self.service_name = client_dir.name.replace("aws_sdk_", "").replace("_", " ").title()
132
+ # Use the explicit override, then the sdkId from the package, then
133
+ # fall back to a title-cased package name (does not keep acronym
134
+ # casing, so "sns" becomes "Sns").
135
+ self.service_name = (
136
+ service_name
137
+ or self._sdk_id_from_package(client_dir)
138
+ or client_dir.name.replace("aws_sdk_", "").replace("_", " ").title()
139
+ )
140
+
141
+ @staticmethod
142
+ def _sdk_id_from_package(client_dir: Path) -> str | None:
143
+ """
144
+ Read the authoritative service name (Smithy sdkId) from the package.
145
+
146
+ The generated ``_private/schemas.py`` carries the ``aws.api#service``
147
+ trait's ``sdkId`` (e.g. "SNS"), the same field the sidebar navigation
148
+ uses, so it keeps acronym casing that the package name does not.
149
+ Returns None if the file or value is absent.
150
+ """
151
+ schemas = client_dir / "_private" / "schemas.py"
152
+ if not schemas.is_file():
153
+ return None
154
+ match = re.search(r'"sdkId":\s*"([^"]+)"', schemas.read_text())
155
+ return match.group(1) if match else None
131
156
 
132
157
  def generate(self) -> bool:
133
158
  """
@@ -166,10 +191,13 @@ class DocStubGenerator:
166
191
  if not client_class:
167
192
  raise ValueError(f"No class ending with 'Client' found in {package_name}.client")
168
193
 
169
- config_class = config_module.members.get("Config")
194
+ config_class = self._find_class_with_suffix(config_module, "Config")
195
+ if not config_class:
196
+ raise ValueError(f"No class ending with 'Config' found in {package_name}.config")
197
+
170
198
  plugin_alias = config_module.members.get("Plugin")
171
- if not config_class or not plugin_alias:
172
- raise ValueError(f"Missing Config or Plugin in {package_name}.config")
199
+ if not plugin_alias:
200
+ raise ValueError(f"Missing Plugin in {package_name}.config")
173
201
 
174
202
  config = TypeInfo(name=config_class.name, module_path=config_class.path)
175
203
  plugin = TypeInfo(name=plugin_alias.name, module_path=plugin_alias.path)
@@ -194,8 +222,12 @@ class DocStubGenerator:
194
222
  )
195
223
 
196
224
  def _find_class_with_suffix(self, module: Module, suffix: str) -> Class | None:
197
- """Find the class in the module with a matching suffix."""
225
+ """Find the class defined in the module with a matching suffix."""
198
226
  for cls in module.classes.values():
227
+ # Skip imported classes so a same-package import (e.g. a *Config
228
+ # class re-exported from config.py) can't shadow the defined one.
229
+ if cls.is_imported:
230
+ continue
199
231
  if cls.name.endswith(suffix):
200
232
  return cls
201
233
  return None
@@ -616,6 +648,12 @@ def main() -> int:
616
648
  required=True,
617
649
  help="Output directory for generated doc stubs",
618
650
  )
651
+ parser.add_argument(
652
+ "-s",
653
+ "--service-name",
654
+ default=None,
655
+ help="Display name for the service (Smithy sdkId, e.g. 'SNS')",
656
+ )
619
657
 
620
658
  args = parser.parse_args()
621
659
  client_dir = args.client_dir.resolve()
@@ -626,7 +664,7 @@ def main() -> int:
626
664
  return 1
627
665
 
628
666
  try:
629
- generator = DocStubGenerator(client_dir, output_dir)
667
+ generator = DocStubGenerator(client_dir, output_dir, args.service_name)
630
668
  success = generator.generate()
631
669
  return 0 if success else 1
632
670
  except Exception as e:
@@ -1,3 +1,3 @@
1
1
  # Code generated by smithy-python-codegen DO NOT EDIT.
2
2
 
3
- __version__: str = "0.8.0"
3
+ __version__: str = "0.10.0"