Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"files": {
"README.md": "767e060d5d96f9a0ca03b7855b5c44f45c5b06969c3246b7e7f03fefb92300ec",
"pyproject.toml": "2b96d5ebbac8419f577edb844746bc7aae73354a671e05609e3b19314ea70d54",
"pyproject.toml": "015c1e66e81c31e73cf4eecca096b1f9f6fab83f4627d7c40c0c74f016d3a3d4",
"src/awsjson10/__init__.py": "619a033058229139a02f912a44a6b8997fb35c5af6736d09edd49927876a49dd",
"src/awsjson10/_private/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"src/awsjson10/_private/schemas.py": "80a90081368257ec9ab1f1518ac786c6b68191b08bdd591de11899e5510aaeae",
Expand Down
2 changes: 1 addition & 1 deletion codegen-output-py/aws-json-1-0/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ requires-python = ">=3.12"
keywords = ["smithy", "awsjson10"]
license = {text = "Apache-2.0"}
dependencies = [
"smithy-core~=0.12.0",
"smithy-core~=0.13.0",
]

[build-system]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"files": {
"README.md": "c4647f521c7bef71503b8a7d4d6cf0619345113a39bd0f32e683951ab170d284",
"pyproject.toml": "b58dac143dc87a184035ed8d111246ef15ddcc575bff1d9aa8aeedf966900f34",
"pyproject.toml": "48daaedd63df476c8ae1cf456b7cbd26de6d1556f4efff8a04533bcfbc84a49f",
"src/awsjson11/__init__.py": "619a033058229139a02f912a44a6b8997fb35c5af6736d09edd49927876a49dd",
"src/awsjson11/_private/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"src/awsjson11/_private/schemas.py": "9e4916f6f66be35ae119fad66e5fdbaa277a2d4f4c6b70b29f2b22065636273d",
Expand Down
2 changes: 1 addition & 1 deletion codegen-output-py/aws-json-1-1/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ requires-python = ">=3.12"
keywords = ["smithy", "awsjson11"]
license = {text = "Apache-2.0"}
dependencies = [
"smithy-core~=0.12.0",
"smithy-core~=0.13.0",
]

[build-system]
Expand Down
2 changes: 1 addition & 1 deletion codegen-output-py/aws-query/.smithy-python-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"files": {
"README.md": "34e2e1a81a1bbc2412be2320d53c78a5c9d2557492c0a2a8826d60f7b12888a4",
"pyproject.toml": "8e62d7233cff08ab5afed75e1aaff7686bac750107937b4b6ebf26ce3c18262a",
"pyproject.toml": "393253cb05bfded5a02393b1f94c88b60a74901ba4e6cf3b7b75fb2a2a1ec8dd",
"src/awsquery/__init__.py": "619a033058229139a02f912a44a6b8997fb35c5af6736d09edd49927876a49dd",
"src/awsquery/_private/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"src/awsquery/_private/schemas.py": "c38f4206d96ebbbb13b43fb9de87fc8f210e49b2ebb5936213bc1586faaa5f4f",
Expand Down
2 changes: 1 addition & 1 deletion codegen-output-py/aws-query/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ requires-python = ">=3.12"
keywords = ["smithy", "awsquery"]
license = {text = "Apache-2.0"}
dependencies = [
"smithy-core~=0.12.0",
"smithy-core~=0.13.0",
]

[build-system]
Expand Down
2 changes: 1 addition & 1 deletion codegen-output-py/ec2-query/.smithy-python-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"files": {
"README.md": "88060523405669e4b71bf32d9f2888d510765cf5d1aa0514b652de95144609a1",
"pyproject.toml": "358fdd421084b9ee092ab914fc88d6c7ccd49845076c9f8022714a8862784707",
"pyproject.toml": "e0809d90933a2cb59f46fb11358c808d44caf077317a0761a4f81c797fc99fde",
"src/ec2query/__init__.py": "619a033058229139a02f912a44a6b8997fb35c5af6736d09edd49927876a49dd",
"src/ec2query/_private/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"src/ec2query/_private/schemas.py": "d5aed93dfd4bcd0e2352724f6390abe866531874f9e6b74ca01c71fc06b99ad1",
Expand Down
2 changes: 1 addition & 1 deletion codegen-output-py/ec2-query/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ requires-python = ">=3.12"
keywords = ["smithy", "ec2query"]
license = {text = "Apache-2.0"}
dependencies = [
"smithy-core~=0.12.0",
"smithy-core~=0.13.0",
]

[build-system]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"files": {
"README.md": "21b6af5d2c11ca92be799a611365291e00be66fee36e0e94876c35ff323358ec",
"pyproject.toml": "41e367adbc95e6d6198626246c8645aa2d156325785209e97f64267a712c5b75",
"src/endpoint_rules_client/__init__.py": "f85901beed783e493475b1ccde6669b030eafa7a9b98f796d9a62e3d584e5286",
"src/endpoint_rules_client/_private/__init__.py": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"src/endpoint_rules_client/_private/endpoints.py": "f5bec5c0c17f9ec3fab86ea81c1472b1771118e6064f52cbb58cf85d89e09b20",
"src/endpoint_rules_client/_private/schemas.py": "804820a7542d2b6df7be9a0e146c17d81ea02eec9e145c056f859e8f6a2c5871",
"src/endpoint_rules_client/aio/__init__.py": "9d803a788ce4051a5e037f67248d7cb3c278781e1bd8380e8a35a67cca039e13",
"src/endpoint_rules_client/aio/client.py": "b2b375ec339945500d429023176de2aae003eaf2255df15fa9e317af6834d2ca",
"src/endpoint_rules_client/aio/config.py": "dc2b548541bdec4ccf2757638c7fed7a7cb07d432193a87e465274a8f187e557",
"src/endpoint_rules_client/client.py": "33e88867c1dcbac308a159a5974db2c7ddcbfebca1728aa789a6ec49b7e30623",
"src/endpoint_rules_client/config.py": "ec161b5e6c5bc00f5f55d3b4f9a41dc52967e6b80240b58ce3dcc0426a00a129",
"src/endpoint_rules_client/models.py": "74fd08f8085335f26b9aa7c46696666700a0e71235a3ae666a40139c19a8eb18",
"src/endpoint_rules_client/models.pyi": "87c615ea467d648b79ca9bdb0eef29006463720de95f71303a39d908cfc4a277",
"src/endpoint_rules_client/py.typed": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"tests/test_endpoints.py": "f24e7dc5f6052b3f5d2e6b55e77c00f4265579619e453d996056da72fbd2014a"
},
"version": 1
}
5 changes: 5 additions & 0 deletions codegen-output-py/endpoint-rules-client/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- Code generated by smithy-python-codegen DO NOT EDIT. -->

## endpoint_rules_client Client Package

Python client for the endpoint rules fixture
44 changes: 44 additions & 0 deletions codegen-output-py/endpoint-rules-client/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Code generated by smithy-python-codegen DO NOT EDIT.

[project]
name = "endpoint_rules_client"
version = "0.0.1"
description = "Python client for the endpoint rules fixture"
readme = "README.md"
requires-python = ">=3.12"
keywords = ["smithy", "endpoint_rules_client"]
license = {text = "Apache-2.0"}
dependencies = [
"smithy-core~=0.13.0",
"smithy-http[aiohttp,cbor,urllib3]~=0.10.0",
]

[dependency-groups]
test = [
"pytest>=9.0.3,<10.0.0",
"pytest-asyncio>=1.3.0,<1.4.0",
"smithy-test~=0.5.0",
]

[build-system]
requires = [
"hatchling",
]
build-backend = "hatchling.build"

[tool.hatch.build.targets.wheel]
packages = [
"src/endpoint_rules_client",
]

[tool.pyright]
typeCheckingMode = "strict"

[tool.ruff]
target-version = "py312"

[tool.ruff.lint]
ignore = ["F841"]

[tool.ruff.format]
skip-magic-trailing-comma = true
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
from importlib import import_module
from typing import TYPE_CHECKING, Any

__version__: str = "0.0.1"

if TYPE_CHECKING:
from .aio.client import AsyncEndpointService
from .aio.config import AsyncConfig
from .client import EndpointService
from .config import Config

__all__ = ["AsyncConfig", "AsyncEndpointService", "Config", "EndpointService"]

_EXPORTS = {
"EndpointService": ".client",
"Config": ".config",
"AsyncEndpointService": ".aio.client",
"AsyncConfig": ".aio.config",
}


def __getattr__(name: str) -> Any:
if name in _EXPORTS:
return getattr(import_module(_EXPORTS[name], __name__), name)
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
from smithy_core.endpoints import EndpointBdd

# fmt: off
# Tags: ref=0, attr=1, call=2, list=3, map=4, error=5, endpoint=6.
BDD = EndpointBdd(
# (name, type, required, default, builtin, client_context_attribute)
parameters=(
("Endpoint", "string", False, None, "SDK::Endpoint", None),
("Region", "string", False, None, "AWS::Region", None),
("Stage", "string", False, None, None, "stage"),
("ForcePathStyle", "boolean", True, False, None, "force_path_style"),
("Name", "string", False, None, None, None),
("Kind", "string", False, None, None, None),
),
functions=("booleanEquals", "isSet", "isValidHostLabel"),
conditions=(
((2, "isSet", (0, "Endpoint")), None), # 0: isSet(Endpoint)
((2, "isSet", (0, "Region")), None), # 1: isSet(Region)
((2, "booleanEquals", (0, "ForcePathStyle"), True), None), # 2: booleanEquals(ForcePathStyle, true)
((2, "isSet", (0, "Kind")), None), # 3: isSet(Kind)
((2, "isSet", (0, "Stage")), None), # 4: isSet(Stage)
((2, "isSet", (0, "Name")), None), # 5: isSet(Name)
((2, "isValidHostLabel", (0, "Name"), False), None), # 6: isValidHostLabel(Name, false)
),
results=(
None, # 0: no match
(6, (0, "Endpoint"), None, ()), # 1
(6, "https://{Region}.example.com", None, ()), # 2
(6, "https://path.example.com", None, ()), # 3
(6, "https://{Name}.{Stage}.example.com", None, (("x-kind", ("{Kind}",)),)), # 4
(6, "https://{Stage}.example.com", (4, ("kind",), "{Kind}"), ()), # 5
(5, "No stage"), # 6
),
root=2,
# (condition, high, low); 1 and -1 are terminals, a negative reference is a
# complement edge, and 100_000_000 + k is result k.
nodes=(
-1, 1, -1,
0, 100_000_001, 3,
1, 100_000_002, 4,
2, 100_000_003, 5,
3, 6, 100_000_006,
4, 7, 100_000_006,
5, 8, 100_000_005,
6, 100_000_004, 100_000_005,
),
)
# fmt: on
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
from types import MappingProxyType

from smithy_core._schema_compact import StaticOperationSchema, StaticSchema

n0 = "example.endpoints"
_s0 = "PluginNames"
_s1 = "member"
_s2 = "ThingTag"
_s3 = "key"
_s4 = "value"
_s5 = "PutThingInput"
_s6 = "smithy.synthetic#originalShapeId"
_s7 = "example.endpoints#PutThingInput"
_s8 = "smithy.api#input"
_s9 = "name"
_s10 = "smithy.rules#contextParam"
_s11 = "smithy.api#required"
_s12 = "tag"
_s13 = "plugins"
_s14 = "PingInput"
_s15 = "smithy.api#Unit"
_s16 = "PingOutput"
_s17 = "smithy.api#output"
_s18 = "PutThingOutput"
_s19 = "Ping"
_s20 = "smithy.rules#staticContextParams"
_s21 = "PutThing"
_s22 = "EndpointService"
_s23 = "smithy.protocols#rpcv2Cbor"

PLUGIN_NAMES: StaticSchema = (
16,
n0,
_s0,
0,
(_s1,),
((3, 0),),
)

THING_TAG: StaticSchema = (
18,
n0,
_s2,
0,
(_s3, _s4),
((3, 0), (3, 0)),
)

PUT_THING_INPUT: StaticSchema = (
18,
n0,
_s5,
{_s6: _s7, _s8: None},
(_s9, _s12, _s13),
(
(3, {_s10: MappingProxyType({"name": "Name"}), _s11: None}),
(THING_TAG, 0),
(PLUGIN_NAMES, 0),
),
)

PING_INPUT: StaticSchema = (
18,
n0,
_s14,
{_s6: _s15, _s8: None},
)

PING_OUTPUT: StaticSchema = (
18,
n0,
_s16,
{_s6: _s15, _s17: None},
)

PUT_THING_OUTPUT: StaticSchema = (
18,
n0,
_s18,
{_s6: _s15, _s17: None},
)

PING: StaticOperationSchema = (
23,
n0,
_s19,
{_s20: MappingProxyType({"Kind": MappingProxyType({"value": "ping"})})},
PING_INPUT,
PING_OUTPUT,
(),
)

PUT_THING: StaticOperationSchema = (
23,
n0,
_s21,
{_s20: MappingProxyType({"Kind": MappingProxyType({"value": "put"})})},
PUT_THING_INPUT,
PUT_THING_OUTPUT,
(),
)

ENDPOINT_SERVICE: StaticSchema = (
21,
n0,
_s22,
{_s23: None},
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from importlib import import_module
from typing import TYPE_CHECKING, Any

if TYPE_CHECKING:
from .client import AsyncEndpointService
from .config import AsyncConfig

__all__ = ["AsyncConfig", "AsyncEndpointService"]

_EXPORTS = {
"AsyncEndpointService": ".client",
"AsyncConfig": ".config",
}


def __getattr__(name: str) -> Any:
if name in _EXPORTS:
return getattr(import_module(_EXPORTS[name], __name__), name)
raise AttributeError(f"module {__name__!r} has no attribute {name!r}")
Loading
Loading