{"id":3027,"library":"mypy-boto3-autoscaling-plans","title":"mypy-boto3-autoscaling-plans Type Annotations","description":"This library provides PEP 561 compliant type annotations for the boto3 AutoScalingPlans service. It enhances static analysis for boto3 users, allowing tools like MyPy to catch type-related errors before runtime. The current version is 1.42.3, which corresponds to boto3 1.42.3, and it receives frequent updates in sync with boto3 releases and the underlying mypy-boto3-builder project.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["aws","boto3","mypy","type-hints","autoscaling-plans","type-stubs","static-analysis"],"install":[{"cmd":"pip install boto3 mypy-boto3-autoscaling-plans","lang":"bash","label":"Install runtime and type stubs"}],"dependencies":[{"reason":"This package provides type stubs for boto3; the actual boto3 runtime library is required to use the AWS SDK.","package":"boto3"}],"imports":[{"note":"The primary import for typing the boto3 client for Auto Scaling Plans.","symbol":"AutoScalingPlansClient","correct":"from mypy_boto3_autoscaling_plans import AutoScalingPlansClient"},{"note":"For Literal type of the service name, useful for client creation.","symbol":"AutoScalingPlansServiceName","correct":"from mypy_boto3_autoscaling_plans import AutoScalingPlansServiceName"},{"note":"Example for importing specific TypeDefs for request/response payloads.","symbol":"DescribeScalingPlansOutputTypeDef","correct":"from mypy_boto3_autoscaling_plans.type_defs import DescribeScalingPlansOutputTypeDef"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_autoscaling_plans import AutoScalingPlansClient\n\n# Initialize a typed boto3 client for Auto Scaling Plans\nclient: AutoScalingPlansClient = boto3.client(\"autoscaling-plans\")\n\ntry:\n    # Example: List existing scaling plans\n    response = client.describe_scaling_plans(\n        ScalingPlanNames=['my-scaling-plan'],\n        MaxResults=5\n    )\n    print(f\"Found {len(response.get('ScalingPlans', []))} scaling plans.\")\n    for plan in response.get('ScalingPlans', []):\n        print(f\"  - Plan Name: {plan['ScalingPlanName']}\")\nexcept Exception as e:\n    print(f\"Error describing scaling plans: {e}\")","lang":"python","description":"This quickstart demonstrates how to import and use the `AutoScalingPlansClient` type for static analysis. It shows the creation of a typed boto3 client and a simple call to `describe_scaling_plans`, benefiting from type hints for parameters and return values."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or higher. If you must use Python 3.8, you will need to use an older version of `mypy-boto3-autoscaling-plans` (e.g., <1.42.0) that was built with an older builder version.","message":"Starting with `mypy-boto3-builder` version 8.12.0 (which generated `mypy-boto3-autoscaling-plans 1.42.3`), Python 3.8 is no longer supported for any `mypy-boto3` stub packages.","severity":"breaking","affected_versions":"mypy-boto3-autoscaling-plans >= 1.42.0"},{"fix":"Ensure both `boto3` and `mypy-boto3-autoscaling-plans` are included in your project dependencies (e.g., `pip install boto3 mypy-boto3-autoscaling-plans`).","message":"These packages provide type stubs, not the actual runtime. You must have `boto3` installed alongside `mypy-boto3-autoscaling-plans` for your application to run.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Align the `mypy-boto3-autoscaling-plans` version with your installed `boto3` version. For example, if you use `boto3==1.28.x`, install `mypy-boto3-autoscaling-plans==1.28.x`.","message":"For accurate type checking, the minor version of `mypy-boto3-autoscaling-plans` should match your `boto3` runtime version. Significant mismatches can lead to incorrect type hints or missing attributes.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Review and update any direct imports of `type_defs` (e.g., `from mypy_boto3_autoscaling_plans.type_defs import OldNameTypeDef` to `NewNameTypeDef`) after upgrading.","message":"The `mypy-boto3-builder` (which this package is based on) changed TypeDef naming conventions in version 8.9.0. If upgrading from very old `mypy-boto3` versions, custom TypeDef imports might break.","severity":"breaking","affected_versions":"mypy-boto3-autoscaling-plans < 1.34.0 (for upgrade path)"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}