api-foundry 0.8.13__tar.gz → 0.8.14__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.
- {api_foundry-0.8.13 → api_foundry-0.8.14}/PKG-INFO +1 -1
- {api_foundry-0.8.13 → api_foundry-0.8.14}/api_foundry/__init__.py +1 -1
- {api_foundry-0.8.13 → api_foundry-0.8.14}/api_foundry/iac/pulumi/api_foundry.py +6 -4
- {api_foundry-0.8.13 → api_foundry-0.8.14}/.gitignore +0 -0
- {api_foundry-0.8.13 → api_foundry-0.8.14}/LICENSE +0 -0
- {api_foundry-0.8.13 → api_foundry-0.8.14}/api_foundry/iac/gateway_spec.py +0 -0
- {api_foundry-0.8.13 → api_foundry-0.8.14}/api_foundry/scripts/install_secret.py +0 -0
- {api_foundry-0.8.13 → api_foundry-0.8.14}/api_foundry/scripts/postgres_to_openapi.py +0 -0
- {api_foundry-0.8.13 → api_foundry-0.8.14}/api_foundry/utils/app_exception.py +0 -0
- {api_foundry-0.8.13 → api_foundry-0.8.14}/api_foundry/utils/logger.py +0 -0
- {api_foundry-0.8.13 → api_foundry-0.8.14}/api_foundry/utils/model_factory.py +0 -0
- {api_foundry-0.8.13 → api_foundry-0.8.14}/api_foundry/utils/schema_validator.py +0 -0
- {api_foundry-0.8.13 → api_foundry-0.8.14}/pyproject.toml +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: api-foundry
|
|
3
|
-
Version: 0.8.
|
|
3
|
+
Version: 0.8.14
|
|
4
4
|
Summary: The `api_foundry` project is a powerful tool designed to automate the deployment of REST APIs on AWS using Lambda services to access and interact with relational databases (RDBMS). This project leverages the OpenAPI specification to define and manage the APIs
|
|
5
5
|
Project-URL: Documentation, https://github.com/DanRepik/api-foundry
|
|
6
6
|
Project-URL: Source, https://github.com/DanRepik/api-foundry
|
|
@@ -150,9 +150,11 @@ def throttle_limits(spec: dict, path_prefix: Optional[str] = None) -> dict[str,
|
|
|
150
150
|
|
|
151
151
|
``*/*`` is the whole stage: the spec's top-level ``x-af-throttle``, else
|
|
152
152
|
DEFAULT_THROTTLE. Each path operation with its own ``x-af-throttle`` gets
|
|
153
|
-
``{resource path}/{METHOD}
|
|
154
|
-
|
|
155
|
-
|
|
153
|
+
``{resource path}/{METHOD}``: the resource path with ``path_prefix`` (as
|
|
154
|
+
cloud_foundry prefixes it) and without its leading "/", the form the AWS
|
|
155
|
+
provider's ``method_path`` takes. The provider stores and looks up the
|
|
156
|
+
setting under exactly this key, so a "~1"-encoded path deploys without
|
|
157
|
+
error and matches no resource.
|
|
156
158
|
"""
|
|
157
159
|
limits = {"*/*": _throttle(spec.get("x-af-throttle", DEFAULT_THROTTLE), "spec")}
|
|
158
160
|
for path, item in (spec.get("paths") or {}).items():
|
|
@@ -163,7 +165,7 @@ def throttle_limits(spec: dict, path_prefix: Optional[str] = None) -> dict[str,
|
|
|
163
165
|
resource = (
|
|
164
166
|
f"{path_prefix.rstrip('/')}/{path.lstrip('/')}" if path_prefix else path
|
|
165
167
|
)
|
|
166
|
-
limits[f"{resource.
|
|
168
|
+
limits[f"{resource.lstrip('/')}/{method.upper()}"] = _throttle(
|
|
167
169
|
operation["x-af-throttle"], f"{method.upper()} {path}"
|
|
168
170
|
)
|
|
169
171
|
return limits
|
|
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
|