Registry /
type-stubs / mypy-boto3-trustedadvisor
Install & Compatibility
Where this runs
tested against v1.43.58 · 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.000s · 19.7MB
glibcpy 3.10–3.910 runs
installs and imports cleanly · install 3.3s · import 0.000s · 20MB
18MB installed
● package 18MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
TrustedAdvisorPublicAPIClient
✓ from mypy_boto3_trustedadvisor import TrustedAdvisorPublicAPIClient
✗ from mypy_boto3_trustedadvisor import TrustedAdvisorPublicAPIClient
This quickstart demonstrates how to obtain a type-hinted TrustedAdvisorPublicAPIClient using boto3 and the mypy-boto3-trustedadvisor stubs. It shows explicit type annotation for the client and a response TypeDef for improved type checking and auto-completion.
import boto3
from mypy_boto3_trustedadvisor.client import TrustedAdvisorPublicAPIClient
from mypy_boto3_trustedadvisor.type_defs import DescribeAccountRecommendationsResponseTypeDef
def get_trustedadvisor_client() -> TrustedAdvisorPublicAPIClient:
# Assuming AWS credentials are configured (e.g., via environment variables, ~/.aws/credentials)
session = boto3.session.Session()
client: TrustedAdvisorPublicAPIClient = session.client('trustedadvisor')
return client
if __name__ == '__main__':
trustedadvisor_client = get_trustedadvisor_client()
# Example API call with type hints
response: DescribeAccountRecommendationsResponseTypeDef = trustedadvisor_client.describe_account_recommendations()
print(response)
Debug
Known issues
breakingSupport for Python 3.8 was removed in mypy-boto3-builder version 8.12.0, which generated this stub. Users on Python 3.8 will need to upgrade their Python version to 3.9 or newer.fixUpgrade your Python environment to 3.9 or later.
affects: >=8.12.0 of mypy-boto3-builder (which corresponds to mypy-boto3-trustedadvisor >=1.42.54)
breakingThe mypy-boto3-builder migrated to PEP 561 compliant packages in version 8.12.0. This change affects how type checkers resolve modules and might require updates to mypy configuration or development environment setups, especially when mixing older and newer stub versions.fixEnsure your type checker (e.g., mypy) and IDE are updated to support PEP 561 standards, and clean any old type stub caches.
affects: >=8.12.0 of mypy-boto3-builder (which corresponds to mypy-boto3-trustedadvisor >=1.42.54)
breakingBeginning with mypy-boto3-builder 8.9.0, TypeDef naming conventions were changed. Arguments like `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`, and `Extra` postfixes moved (`CreateDistributionExtraRequestTypeDef` to `CreateDistributionRequestExtraTypeDef`). This affects all generated service stubs, including Trusted Advisor.fixReview and update `TypeDef` import paths and names in your codebase according to the new conventions.
affects: >=8.9.0 of mypy-boto3-builder
gotchaPyCharm might experience slow performance with Literal overloads when using boto3-stubs. It is recommended to use `boto3-stubs-lite` if performance issues are encountered. Alternatively, disable PyCharm's internal type checker and rely on external tools like mypy or pyright.fixConsider `pip install 'boto3-stubs-lite[trustedadvisor]'` or adjust PyCharm's type checking settings.
affects: All versions, specifically impacting PyCharm users
gotchaFor standalone packages like `mypy-boto3-trustedadvisor`, explicit type annotations are often required for `boto3.client` calls to leverage the type stubs effectively. Automatic type discovery may not work without the full `boto3-stubs` umbrella package.fixAlways explicitly annotate `client: TrustedAdvisorPublicAPIClient = session.client('trustedadvisor')`. affects: All versions when using standalone packages
gotchaService names within the AWS ecosystem can be renamed or deprecated (e.g., `sms-voice` to `pinpoint-sms-voice` in older releases of mypy-boto3-builder). While not specific to TrustedAdvisor, this pattern means users should be aware that the corresponding stub package name might change in the future if AWS renames the service.fixStay updated with boto3 and mypy-boto3-builder release notes to catch any service renaming or deprecation affecting stub packages.
affects: All versions, as a general ecosystem pattern
Upgrade
Version history
1.43.58latest on PyPI · released Jul 28, 2026
Audit
Dependencies
boto3requiredRuntime dependency for AWS API calls; these are type stubs for boto3.
typing-extensionsoptionalUsed by the generated stubs for compatibility with Python versions older than 3.9, though the package itself requires >=3.9.