{"id":3011,"library":"mypy-boto3-amplifyuibuilder","title":"mypy-boto3-amplifyuibuilder type annotations","description":"This library provides type annotations for the `boto3` AWS SDK, specifically for the AmplifyUIBuilder service. It enables static type checking with tools like MyPy, Pyright, VSCode, and PyCharm, improving code quality and developer experience. The package is currently at version 1.42.3 and is generated by the `mypy-boto3-builder` (version 8.12.0), which follows a frequent release cadence tied to upstream `boto3` updates and builder improvements.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["boto3","aws","mypy","typing","type-hints","amplifyuibuilder","stubs"],"install":[{"cmd":"pip install mypy-boto3-amplifyuibuilder boto3","lang":"bash","label":"Install specific service stubs and boto3"},{"cmd":"pip install 'boto3-stubs[amplifyuibuilder]' boto3","lang":"bash","label":"Install via boto3-stubs umbrella package (recommended)"}],"dependencies":[{"reason":"Provides the actual AWS SDK functionality; mypy-boto3-amplifyuibuilder only provides type annotations.","package":"boto3","optional":false},{"reason":"This package is often installed as a dependency of `boto3-stubs` when specifying service extras, offering comprehensive type annotations for `boto3.client` overloads. While `mypy-boto3-amplifyuibuilder` can be installed directly, using `boto3-stubs` is the recommended approach for full functionality.","package":"boto3-stubs","optional":true}],"imports":[{"note":"The client type hint is imported from the specific `mypy-boto3-amplifyuibuilder` stub package, not directly from `boto3`.","wrong":"from boto3.client import AmplifyUIBuilderClient","symbol":"AmplifyUIBuilderClient","correct":"from mypy_boto3_amplifyuibuilder.client import AmplifyUIBuilderClient"}],"quickstart":{"code":"import boto3\nfrom typing import TYPE_CHECKING\n\nif TYPE_CHECKING:\n    from mypy_boto3_amplifyuibuilder.client import AmplifyUIBuilderClient\n\ndef get_amplifyuibuilder_client() -> AmplifyUIBuilderClient:\n    \"\"\"Gets a typed AmplifyUIBuilder client.\"\"\"\n    client: AmplifyUIBuilderClient = boto3.client(\n        \"amplifyuibuilder\",\n        region_name=\"us-east-1\"\n    )\n    return client\n\n# Example usage (will be type-checked by MyPy)\nif __name__ == \"__main__\":\n    try:\n        amplify_client = get_amplifyuibuilder_client()\n        # Replace with an actual AmplifyUIBuilder API call\n        # For example, listing components, if any exist\n        print(f\"Client type: {type(amplify_client)}\")\n        # Example: list components (requires valid AWS credentials and existing resources)\n        # response = amplify_client.list_components()\n        # print(f\"Components: {response.get('entities')}\")\n        print(\"AmplifyUIBuilder client initialized successfully. Further calls require valid AWS credentials and service usage.\")\n    except Exception as e:\n        print(f\"An error occurred: {e}\")","lang":"python","description":"This quickstart demonstrates how to obtain a type-hinted `AmplifyUIBuilderClient` using `boto3` and the `mypy-boto3-amplifyuibuilder` stubs. The `TYPE_CHECKING` guard ensures the stub import is only active during type checking, avoiding a runtime dependency on the stub package itself. Remember to have `boto3` installed and configured with AWS credentials."},"warnings":[{"fix":"Upgrade to Python 3.9 or higher. If unable to upgrade, pin `mypy-boto3-amplifyuibuilder` to a version generated by `mypy-boto3-builder < 8.12.0`.","message":"Support for Python 3.8 has been removed in `mypy-boto3-builder` version 8.12.0, which generates this package. Projects requiring Python 3.8 should use an older version of `mypy-boto3-amplifyuibuilder` or upgrade their Python environment.","severity":"breaking","affected_versions":">=8.12.0 of mypy-boto3-builder (generates mypy-boto3-amplifyuibuilder >=1.42.3)"},{"fix":"Ensure your `mypy` configuration is up-to-date and relies on standard package discovery. No specific code changes are typically required unless you have highly customized type-checking setups.","message":"The `mypy-boto3-builder` migrated to PEP 561 compliant packages in version 8.12.0. While this simplifies `mypy` integration, it might affect custom build processes or older tooling that relied on non-PEP 561 distribution methods.","severity":"breaking","affected_versions":">=8.12.0 of mypy-boto3-builder (generates mypy-boto3-amplifyuibuilder >=1.42.3)"},{"fix":"Always install `boto3` alongside `mypy-boto3-amplifyuibuilder` (e.g., `pip install boto3 mypy-boto3-amplifyuibuilder`).","message":"This package provides *only* type annotations. You must install `boto3` (and optionally `botocore`) separately for your application to function at runtime. Without `boto3`, your code will raise `ModuleNotFoundError`.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Install `boto3-stubs` with service extras: `pip install 'boto3-stubs[amplifyuibuilder]'`.","message":"For comprehensive type checking, especially when using `boto3.client()` or `boto3.resource()` without explicit type hints, it is recommended to install `boto3-stubs` with the appropriate service extras (e.g., `pip install 'boto3-stubs[amplifyuibuilder]'`). This provides overloads for the generic `boto3` functions.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Review and update any explicit references to generated TypeDefs in your codebase. Refer to the specific service documentation for the updated TypeDef names.","message":"The `mypy-boto3-builder` (version 8.9.0) introduced changes to TypeDef naming conventions, potentially shortening names or reordering suffixes for clarity (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`). If you directly reference these generated TypeDefs in your code, they might have changed.","severity":"breaking","affected_versions":">=8.9.0 of mypy-boto3-builder"},{"fix":"To suppress Pylint errors, assign `object` to the client/resource variables in the `else` branch (e.g., `else: AmplifyUIBuilderClient = object`) or use `# type: ignore` for those lines. Refer to the official `mypy-boto3` documentation for Pylint compatibility details.","message":"When using `if TYPE_CHECKING:` guards to conditionally import stubs for Pylint compatibility, Pylint might report `undefined variable` errors in the `else` block. This is a known Pylint limitation.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}