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
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.608s · 116.6MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 5.9s · import 0.572s · 114MB
114MB installed
● package 114MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
AppRunnerClient
✓ from mypy_boto3_apprunner.client import AppRunnerClient
✗ from boto3.client import AppRunner
Client types are provided by `mypy-boto3-apprunner`, not directly from `boto3` or `botocore`.
ServiceSummaryTypeDef
✓ from mypy_boto3_apprunner.type_defs import ServiceSummaryTypeDef
✗ from boto3.apprunner.type_defs import ServiceSummaryTypeDef
Specific type definitions (TypedDicts) are imported from the `mypy_boto3_apprunner.type_defs` submodule.
This quickstart demonstrates how to use `mypy-boto3-apprunner` to provide type hints for the AppRunner client. It fetches a list of AppRunner services, leveraging the `AppRunnerClient` type for autocompletion and static analysis. The `TYPE_CHECKING` guard ensures the type-only imports don't introduce runtime dependencies.
import boto3
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from mypy_boto3_apprunner.client import AppRunnerClient
from mypy_boto3_apprunner.type_defs import ServiceSummaryTypeDef
def get_apprunner_services() -> list['ServiceSummaryTypeDef']:
client: AppRunnerClient = boto3.client("apprunner")
response = client.list_services(
MaxResults=5,
NextToken=None # Use actual token for pagination in real apps
)
return response.get("ServiceSummaryList", [])
if __name__ == "__main__":
# This code block will run at runtime, but only if boto3 is configured.
# For type checking, mypy will use the stubs.
# Ensure AWS credentials are set up (e.g., via AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION_NAME env vars)
# or ~/.aws/credentials and ~/.aws/config
try:
services = get_apprunner_services()
print(f"Found {len(services)} AppRunner services:")
for service in services:
print(f" - {service['ServiceName']} (Status: {service['Status']})")
except Exception as e:
print(f"Error fetching AppRunner services: {e}")
Debug
Known issues
breakingPython 3.8 support was removed starting with `mypy-boto3-builder` version 8.12.0. Users on Python 3.8 or older will need to upgrade their Python version to use recent `mypy-boto3` packages.fixUpgrade Python to 3.9 or newer.
affects: >= 8.12.0 of mypy-boto3-builder (and generated packages)
breakingThe `mypy-boto3-builder` version 8.9.0 introduced breaking changes to generated TypeDef names. Specifically, arguments for methods may use shorter names, and 'Extra' postfixes were moved to the end of conflicting TypeDef names (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`). If you were directly referencing generated TypeDef names, these might have changed.fixUpdate imports and references to TypeDefs according to the new naming conventions. Use IDE autocompletion to find the correct names.
affects: >= 8.9.0 of mypy-boto3-builder (and generated packages)
gotchaWhile `boto3-stubs` (the umbrella project) offers implicit type annotations, explicit type annotations for `boto3.client` and `boto3.session.client` calls are often recommended for the best experience with IDEs (like VSCode, PyCharm) and strict `mypy` configurations.fixAlways explicitly type-hint your `boto3` client variables, e.g., `client: AppRunnerClient = boto3.client('apprunner')`. affects: All versions
gotchaThis package provides *type annotations* for `boto3`'s AppRunner client. It does not include `boto3` itself. You must install `boto3` separately for your code to run at runtime.fixEnsure `boto3` is installed alongside `mypy-boto3-apprunner` (e.g., `pip install boto3 mypy-boto3-apprunner`).
affects: All versions
gotchaWhen using `if TYPE_CHECKING:` to conditionally import type hints, `pylint` may incorrectly report 'undefined variable' warnings. This can be mitigated by assigning `object` to the type aliases in the `else` branch.fixImplement an `else` branch in `if TYPE_CHECKING:` blocks to assign `object` to your type aliases (e.g., `else: AppRunnerClient = object`).
affects: All versions (when using `pylint` with conditional imports)
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredThis package provides type stubs for the `boto3` library; `boto3` itself is required at runtime.
mypyrequiredThis library is designed for static type checking with `mypy`.
typing-extensionsoptionalMay be a transitive dependency for older Python versions, though current versions often target >=3.9 which includes many typing features.