Registry /
type-stubs / mypy-boto3-accessanalyzer
Install & Compatibility
Where this runs
tested against v1.43.10 · 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.910 runs
installs and imports cleanly · install 0.0s · import 0.644s · 118.1MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 7.8s · import 0.610s · 116MB
116MB installed
● package 116MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
AccessAnalyzerClient
✓ from mypy_boto3_accessanalyzer.client import AccessAnalyzerClient
✗ from boto3.client import AccessAnalyzerClient
The `boto3` library itself does not provide explicit type annotations, hence direct import from `mypy_boto3_accessanalyzer` is necessary for type checking.
AccessAnalyzerServiceName
✓ from mypy_boto3_accessanalyzer.literals import AccessAnalyzerServiceName
For literal types used in client creation or other methods.
ListAnalyzersResponseTypeDef
✓ from mypy_boto3_accessanalyzer.type_defs import ListAnalyzersResponseTypeDef
Access specific TypeDefs for request/response objects.
This quickstart demonstrates how to obtain a type-hinted `AccessAnalyzerClient` using `mypy-boto3-accessanalyzer` and `boto3`. The `TYPE_CHECKING` block ensures type hints are only used during static analysis, avoiding runtime dependencies. The client returned by `get_accessanalyzer_client()` will provide autocomplete and type safety for all AccessAnalyzer operations and their associated data structures.
import boto3
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from mypy_boto3_accessanalyzer.client import AccessAnalyzerClient
from mypy_boto3_accessanalyzer.type_defs import ListAnalyzersResponseTypeDef
def get_accessanalyzer_client() -> AccessAnalyzerClient:
"""Returns a type-hinted AccessAnalyzer client."""
# boto3 client creation remains the same
client: AccessAnalyzerClient = boto3.client("accessanalyzer")
return client
if __name__ == "__main__":
# Example usage
client = get_accessanalyzer_client()
# The client now has full type hints for methods and their parameters/returns.
# For instance, client.list_analyzers() is type-checked.
response: ListAnalyzersResponseTypeDef = client.list_analyzers()
print(f"Found {len(response.get('analyzers', []))} Access Analyzers.")
Debug
Known issues
breakingPython 3.8 support was removed for all `mypy-boto3-builder` generated packages, including `mypy-boto3-accessanalyzer`, starting with builder version 8.12.0.fixUpgrade your Python environment to 3.9 or higher. If Python 3.8 is required, use an older version of `mypy-boto3-accessanalyzer` compatible with builder < 8.12.0.
affects: mypy-boto3-builder >= 8.12.0 (equivalent mypy-boto3-accessanalyzer versions)
breakingTypeDef naming conventions changed in `mypy-boto3-builder` 8.9.0. For example, `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`. This affects direct imports of specific type definitions.fixReview your code for direct imports of `type_defs` and update names according to the new conventions (e.g., remove redundant 'Request' suffixes or adjust 'Extra' postfixes). Refer to the specific service's `type_defs` module for correct names.
affects: mypy-boto3-builder >= 8.9.0 (equivalent mypy-boto3-accessanalyzer versions)
gotchaWhen using Pylint with `TYPE_CHECKING` for conditional imports, Pylint might report undefined variables in the `else` block. This is a known issue with Pylint's handling of conditional typing.fixTo resolve Pylint warnings, explicitly assign `object` to the type symbols in the `else` branch of the `TYPE_CHECKING` block: `else: AccessAnalyzerClient = object`.
affects: All versions
gotchaPyCharm users might experience slow performance or high CPU usage when using `mypy-boto3` stubs due to PyCharm's handling of `Literal` overloads (issue PY-40997).fixConsider installing `boto3-stubs-lite` (e.g., `pip install 'boto3-stubs-lite[accessanalyzer]'`) which provides a more RAM-friendly alternative by requiring explicit type annotations. Alternatively, disable PyCharm's internal type checker and rely solely on `mypy` or `pyright` for type checking.
affects: All versions, specific to PyCharm IDE
gotchaThis package (`mypy-boto3-accessanalyzer`) is a standalone stub package for a specific service. For a more integrated approach, `boto3-stubs` with service-specific extras (`pip install 'boto3-stubs[accessanalyzer]'`) is often recommended, as it manages a consolidated `boto3` stub environment.fixChoose the installation method that best suits your project's needs. If managing multiple boto3 service types, `boto3-stubs` with extras can simplify dependency management.
affects: All versions
Upgrade
Version history
1.43.10latest on PyPI · released May 18, 2026
Audit
Dependencies
boto3requiredProvides the AWS SDK for Python that these type stubs annotate.
mypyoptionalRequired for static type checking using these annotations.