{"id":3018,"library":"mypy-boto3-application-autoscaling","title":"mypy-boto3-application-autoscaling Type Stubs","description":"This library provides type annotations (stubs) for the `boto3` client for the AWS Application Auto Scaling service. It enables static type checking with tools like Mypy, improving code reliability and developer experience when working with AWS SDK for Python. The current version is 1.42.3, and releases typically follow the `boto3` release cycle, with new stub packages generated for each new `boto3` version.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["AWS","Boto3","Type Checking","Mypy","ApplicationAutoScaling","Stubs"],"install":[{"cmd":"pip install mypy-boto3-application-autoscaling boto3 mypy","lang":"bash","label":"Install with dependencies"}],"dependencies":[{"reason":"Required at runtime for actual AWS API calls. Stubs provide type hints for this library.","package":"boto3"},{"reason":"Type checker required to utilize these stubs.","package":"mypy","optional":true}],"imports":[{"symbol":"ApplicationAutoScalingClient","correct":"from mypy_boto3_application_autoscaling import ApplicationAutoScalingClient"},{"note":"For specific response or request type definitions.","symbol":"DescribeScalableTargetsResponseTypeDef","correct":"from mypy_boto3_application_autoscaling.type_defs import DescribeScalableTargetsResponseTypeDef"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_application_autoscaling import ApplicationAutoScalingClient\nfrom mypy_boto3_application_autoscaling.type_defs import DescribeScalableTargetsResponseTypeDef\n\ndef list_scalable_targets() -> None:\n    # Using type hint for the boto3 client\n    client: ApplicationAutoScalingClient = boto3.client('application-autoscaling')\n\n    # Example API call\n    response: DescribeScalableTargetsResponseTypeDef = client.describe_scalable_targets(\n        ServiceNamespace='ec2'\n    )\n\n    print(f\"Scalable targets found: {len(response['ScalableTargets'])}\")\n    for target in response['ScalableTargets']:\n        print(f\"- Resource ID: {target['ResourceId']}, Dimension: {target['ScalableDimension']}\")\n\n# To run type checking:\n# 1. Save this as a Python file (e.g., `main.py`)\n# 2. Run `mypy main.py` in your terminal\n\n# To execute the code (requires AWS credentials configured):\n# list_scalable_targets()","lang":"python","description":"This quickstart demonstrates how to type-annotate a `boto3` Application Auto Scaling client using `mypy-boto3-application-autoscaling` stubs. It also shows how to use specific `TypeDef` for API response objects, enabling Mypy to validate attribute access and types."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or newer. If you must use Python 3.8, pin `mypy-boto3-application-autoscaling` to a version older than 1.42.3 (e.g., `mypy-boto3-application-autoscaling<1.42.3`).","message":"Python 3.8 support has been removed. All `mypy-boto3` packages, including `mypy-boto3-application-autoscaling`, now require Python 3.9 or newer.","severity":"breaking","affected_versions":">=1.42.3 (mypy-boto3-application-autoscaling), >=8.12.0 (mypy-boto3-builder)"},{"fix":"Ensure your `mypy` and other type-checking tools are up-to-date. If you encounter issues, review `mypy` documentation on PEP 561 compliance and package discovery.","message":"The `mypy-boto3-builder` migrated to PEP 561 compliant packages. While this generally improves compatibility with type checkers, it might affect custom build processes or tools that rely on the old package structure.","severity":"breaking","affected_versions":">=1.42.3 (mypy-boto3-application-autoscaling), >=8.12.0 (mypy-boto3-builder)"},{"fix":"Always install `mypy-boto3-application-autoscaling` with the same major.minor.patch version as your `boto3` installation (e.g., if `boto3==1.42.3`, install `mypy-boto3-application-autoscaling==1.42.3`).","message":"The version of `mypy-boto3-application-autoscaling` should ideally match your `boto3` runtime version to ensure accurate type hints. Mismatched versions can lead to `mypy` errors or incorrect type inferences.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Update your code to use the shorter TypeDef names. Consult the specific service's `mypy-boto3` documentation or generated files for the correct names.","message":"In `mypy-boto3-builder` 8.9.0, TypeDef names for packed method arguments were shortened (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`). If you were directly importing these longer names, they will no longer exist.","severity":"breaking","affected_versions":">=1.34.0 (mypy-boto3-application-autoscaling), >=8.9.0 (mypy-boto3-builder)"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}