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.
- aws_sdk_lambda-0.10.0/.changes/0.10.0.json +8 -0
- aws_sdk_lambda-0.10.0/.changes/0.9.0.json +12 -0
- {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/.gitignore +1 -2
- {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/CHANGELOG.md +11 -0
- {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/Makefile +1 -1
- {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/PKG-INFO +4 -4
- {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/docs/README.md +1 -1
- {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/pyproject.toml +5 -6
- {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/scripts/docs/generate_doc_stubs.py +48 -10
- {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/src/aws_sdk_lambda/__init__.py +1 -1
- {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/src/aws_sdk_lambda/client.py +1839 -523
- {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/src/aws_sdk_lambda/config.py +103 -105
- {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/src/aws_sdk_lambda/models.py +1 -1
- {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/src/aws_sdk_lambda/user_agent.py +2 -2
- aws_sdk_lambda-0.8.0/tests/test_protocol.py → aws_sdk_lambda-0.10.0/tests/test_restjson_protocol.py +2 -0
- aws_sdk_lambda-0.10.0/zensical.toml +83 -0
- aws_sdk_lambda-0.8.0/docs/hooks/copyright.py +0 -6
- aws_sdk_lambda-0.8.0/mkdocs.yml +0 -96
- {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/.changes/0.8.0.json +0 -0
- {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/LICENSE +0 -0
- {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/NOTICE +0 -0
- {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/README.md +0 -0
- {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/docs/index.md +0 -0
- {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/docs/stylesheets/extra.css +0 -0
- {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/src/aws_sdk_lambda/_private/__init__.py +0 -0
- {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/src/aws_sdk_lambda/_private/schemas.py +0 -0
- {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/src/aws_sdk_lambda/auth.py +0 -0
- {aws_sdk_lambda-0.8.0 → aws_sdk_lambda-0.10.0}/tests/__init__.py +0 -0
|
@@ -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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: aws_sdk_lambda
|
|
3
|
-
Version: 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.
|
|
22
|
-
Requires-Dist: smithy-core~=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
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[project]
|
|
4
4
|
name = "aws_sdk_lambda"
|
|
5
|
-
version = "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.
|
|
27
|
-
"smithy_core~=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
|
-
"
|
|
34
|
-
"
|
|
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
|
|
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
|
-
#
|
|
129
|
-
# (
|
|
130
|
-
|
|
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 =
|
|
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
|
|
172
|
-
raise ValueError(f"Missing
|
|
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:
|