Registry / type-stubs / mypy-boto3-account

mypy-boto3-account

JSON →
library1.43.57pypypi✓ verified 23d ago

Type annotations for boto3 Account 1.42.6 service generated with mypy-boto3-builder 8.12.0. This library provides precise type hints for the AWS Account service, significantly enhancing static analysis capabilities with tools like mypy, VSCode, and PyCharm for improved code quality and developer experience.

pip install mypy-boto3-account boto3 mypy
INSTALL
IMPORT
SIG · MYPY-BOTO3-ACCOUNT
M
mypy-boto3-account
type-stubspythonv1.43.57
Install
6.0s avg
Import
571ms
Disk
114MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.43.57 · 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.95 runs
installs and imports cleanly · install 0.0s · import 0.596s · 116.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 6.0s · import 0.546s · 114MB
114MB installed
● package 114MB
Code
Verified usage

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

AccountClient
from mypy_boto3_account import AccountClient
ListRegionsPaginator
from mypy_boto3_account.paginator import ListRegionsPaginator
AlternateContactTypeType
from mypy_boto3_account.literals import AlternateContactTypeType
AcceptPrimaryEmailUpdateRequestTypeDef
from mypy_boto3_account.type_defs import AcceptPrimaryEmailUpdateRequestTypeDef
AccountClient
from typing import TYPE_CHECKING if TYPE_CHECKING: from mypy_boto3_account import AccountClient else: AccountClient = object
from mypy_boto3_account import AccountClient # in production without TYPE_CHECKING
For production code where mypy-boto3-account is only a dev dependency, use `TYPE_CHECKING` to avoid runtime import errors and satisfy linters like Pylint.

This example demonstrates how to obtain an AWS Account client with type annotations and use it to list regions. It employs `TYPE_CHECKING` for safe development-only dependency management and explicit type hints for maximal static analysis benefit.

from typing import TYPE_CHECKING import boto3 if TYPE_CHECKING: from mypy_boto3_account import AccountClient from mypy_boto3_account.type_defs import ListRegionsResponseTypeDef def get_account_regions() -> 'ListRegionsResponseTypeDef': """Gets a list of regions for the current AWS account.""" client: AccountClient = boto3.client("account") response: ListRegionsResponseTypeDef = client.list_regions() return response if __name__ == "__main__": # Ensure AWS credentials are configured (e.g., via AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION env vars) # Or use a local AWS config/credentials file try: regions_data = get_account_regions() print(f"Account Regions: {[r['RegionName'] for r in regions_data.get('Regions', [])]}") except Exception as e: print(f"Error: {e}") print("Ensure AWS credentials and permissions for 'account:ListRegions' are configured.")
Debug
Known issues
breakingSupport for Python 3.8 has been removed in `mypy-boto3-builder` version 8.12.0 and subsequently across all generated packages. Projects targeting `mypy-boto3-account` must use Python 3.9 or newer.
fix
Upgrade your Python environment to 3.9 or higher.
affects: >=8.12.0
breakingTypeDef naming conventions changed in `mypy-boto3-builder` version 8.9.0. This includes shortening packed argument TypeDefs (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`) and moving `Extra` postfixes (e.g., `CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`). These changes may require updates to existing type hint usage for various services.
fix
Review and update `TypeDef` import paths and names in your codebase according to the new conventions. Consult the specific service's documentation for exact type names.
affects: >=8.9.0
gotchaThe `mypy-boto3-builder` and its generated packages migrated to PEP 561 standard packages. This change might affect how type checkers or IDEs discover types if your build setup is not up-to-date or if you rely on older `mypy` versions.
fix
Ensure your `mypy` version is recent and your `pyproject.toml` (or equivalent) configuration correctly points to your installed type stubs. You may need to rebuild your environment or clear caches if type resolution issues occur.
affects: >=8.12.0
deprecatedThe `sms-voice` service was deprecated and removed from `mypy-boto3` builds in version 8.11.0 of the builder. Users should now use `pinpoint-sms-voice` instead.
fix
Migrate your code to use the `pinpoint-sms-voice` service and install `mypy-boto3-pinpoint-sms-voice` if applicable.
affects: >=8.11.0 (for `sms-voice` related packages)
gotchaWhen using `mypy-boto3-account` as a development-only dependency with `TYPE_CHECKING` guards, older versions of `Pylint` might incorrectly complain about undefined variables. This can be mitigated by explicitly assigning `object` to the type hints in the `else` block.
fix
Either update `Pylint` to a version that correctly handles `TYPE_CHECKING` or explicitly set the types to `object` in the `else` branch of your `TYPE_CHECKING` block. Example: `if TYPE_CHECKING: from mypy_boto3_ec2 import EC2Client else: EC2Client = object`.
affects: All versions when using `TYPE_CHECKING` with specific Pylint versions
Upgrade
Version history
1.43.57latest on PyPI · released Jul 27, 2026
Audit
Dependencies
boto3requiredRuntime dependency for interacting with AWS services.
mypyoptionalStatic type checker for utilizing the provided type annotations.
Agent activity
18 hits · last 30 days
node
14
OpenAI (training)
2
Resources
mypy-boto3-account — pip install mypy-boto3-account · libregistry