Registry / type-stubs / mypy-boto3-autoscaling

mypy-boto3-autoscaling

JSON →
library1.42.79pypypiunverified

mypy-boto3-autoscaling provides comprehensive type annotations (stubs) for the boto3 AutoScaling service. It enables static type checking for your boto3 code using tools like mypy, catching potential errors at development time. The current version is 1.42.79, and it's part of the frequently updated mypy-boto3-builder ecosystem, with releases typically aligning with new boto3/botocore versions.

type-stubsaws
Install & Compatibility
Where this runs
tested against v1.43.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.925 runs
installs and imports cleanly · install 0.0s · import 0.667s · 51.6MB
glibc
py 3.103.925 runs
installs and imports cleanly · install 3.8s · import 0.627s · 52MB
50MB installed
● package 50MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

from mypy_boto3_autoscaling.client import AutoScalingClient
from mypy_boto3_autoscaling.type_defs import DescribeAutoScalingGroupsResponseTypeDef

This quickstart demonstrates how to initialize an AutoScaling client with type hints provided by `mypy-boto3-autoscaling` and make a basic API call, ensuring that the client and response objects are correctly typed for static analysis.

import boto3 from mypy_boto3_autoscaling.client import AutoScalingClient from mypy_boto3_autoscaling.type_defs import DescribeAutoScalingGroupsResponseTypeDef import os # Ensure boto3 is configured, e.g., via AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION # or AWS CLI config files. # Using os.environ.get for demonstration purposes, actual credentials should be handled securely. # Instantiate the AutoScaling client with type hints client: AutoScalingClient = boto3.client("autoscaling", region_name=os.environ.get('AWS_REGION', 'us-east-1')) try: # Call a method and apply type hints for the response response: DescribeAutoScalingGroupsResponseTypeDef = client.describe_auto_scaling_groups() print(f"Found {len(response['AutoScalingGroups'])} Auto Scaling Groups:") for group in response['AutoScalingGroups']: print(f" - {group['AutoScalingGroupName']} (Min: {group['MinSize']}, Max: {group['MaxSize']})") except Exception as e: print(f"An error occurred: {e}")
Debug
Known footguns
breakingPython 3.8 is no longer supported. Releases of `mypy-boto3-builder` version 8.12.0 and later (which this package relies on) removed support for Python 3.8.
breakingSpecific TypeDef names used in method arguments or for conflicting types were changed for brevity and consistency. For example, `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef` and `CreateDistributionExtraRequestTypeDef` became `CreateDistributionRequestExtraTypeDef`.
gotchaWhile `mypy-boto3-autoscaling` lists `botocore` as a dependency, it only provides type stubs. You still need to install `boto3` (which includes `botocore`) separately for the actual runtime functionality of the AWS SDK. The stub package does not provide the SDK implementation.
gotchaUsing mismatched versions of `mypy-boto3-autoscaling` and `boto3` (or `botocore`) can lead to incorrect type hints or runtime errors. The stub package is generated against a specific version of `boto3`'s API.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
15 hits · last 30 days
gptbot
4
ahrefsbot
4
script
1
bytedance
1
Resources