Registry / type-stubs / types-aiobotocore-sts

types-aiobotocore-sts

JSON →
library3.7.0pypypiunverified

This library provides type annotations for the `aiobotocore` STS (Security Token Service) client, currently at version 3.4.0. Generated by `mypy-boto3-builder 8.12.0`, it enables static type checking with tools like MyPy and PyRight, and offers enhanced IDE auto-completion for `aiobotocore`'s asynchronous AWS client, covering STS client methods, literals, and type definitions.

pip install types-aiobotocore-sts
INSTALL
IMPORT
SIG · TYPES-AIOBOTOCORE-
T
types-aiobotocore-sts
type-stubspythonv3.7.0
Install
3.1s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.7.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.940 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.6MB
glibc
py 3.103.940 runs
installs and imports cleanly · install 3.1s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage

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

STSClient
from types_aiobotocore_sts import STSClient
from types_aiobotocore_sts.client import STSClient

This example demonstrates how to use `types-aiobotocore-sts` to add static type checking to your `aiobotocore` STS client. The `STSClient` and `GetCallerIdentityResponseTypeDef` are imported under `TYPE_CHECKING` to ensure they are only used during type analysis, avoiding a runtime dependency if desired. When running, `aiobotocore` will automatically pick up AWS credentials from standard locations (environment variables, `~/.aws/credentials`).

import asyncio from typing import TYPE_CHECKING from aiobotocore.session import get_session # Recommended: Import types only for type checking if TYPE_CHECKING: from types_aiobotocore_sts.client import STSClient from types_aiobotocore_sts.type_defs import GetCallerIdentityResponseTypeDef async def get_aws_caller_identity(): session = get_session() async with session.create_client("sts") as client: # Explicit type annotation for client for best IDE support if TYPE_CHECKING: client: STSClient print("Getting caller identity...") response: GetCallerIdentityResponseTypeDef = await client.get_caller_identity() print(f"AWS Account: {response.get('Account')}") print(f"AWS User ARN: {response.get('Arn')}") if __name__ == "__main__": # This example requires valid AWS credentials configured (e.g., via environment variables or ~/.aws/credentials) # It does not explicitly use os.environ.get for credentials, assuming aiobotocore handles it. asyncio.run(get_aws_caller_identity())
Debug
Known issues
breakingSupport for Python 3.8 was removed starting with `mypy-boto3-builder 8.12.0` (which generated `types-aiobotocore-sts 3.4.0`). Projects using Python 3.8 will need to upgrade to Python 3.9 or later.
fix
Upgrade your Python environment to 3.9 or newer.
affects: >=3.4.0 (generated by mypy-boto3-builder >=8.12.0)
gotcha`types-aiobotocore-sts` is a 'stubs only' package. It provides type annotations but does not install `aiobotocore` itself or any other runtime dependencies. Your project must explicitly install `aiobotocore` (e.g., `pip install aiobotocore`) for the code to run.
fix
Ensure `aiobotocore` is installed alongside `types-aiobotocore-sts` (e.g., `pip install aiobotocore types-aiobotocore-sts`).
affects: All versions
gotchaFor optimal type checking, the version of `types-aiobotocore-sts` should ideally match or be compatible with your installed `aiobotocore` version. Mismatched versions might lead to incorrect or missing type hints, especially after significant AWS API changes.
fix
Keep `types-aiobotocore-sts` and `aiobotocore` versions synchronized, or use the `types-aiobotocore` umbrella package with service extras to manage compatibility (e.g., `pip install 'types-aiobotocore[sts]'`).
affects: All versions
gotchaWhen using `Pylint` with type annotations imported under `typing.TYPE_CHECKING`, Pylint might report 'undefined variables'. The recommended workaround is to explicitly set the type-hinted variables to `object` in the `else` branch of the `TYPE_CHECKING` block.
fix
Implement the `if TYPE_CHECKING: ... else: var = object` pattern to satisfy Pylint, as shown in the package's documentation.
affects: All versions
Upgrade
Version history
3.7.0latest on PyPI · released May 10, 2026
Audit
Dependencies
aiobotocoreoptionalThis package provides type hints for aiobotocore. It is required at runtime for the code to function, though not a direct installation dependency of types-aiobotocore-sts itself (which is 'stubs only').
Agent activity
36 hits · last 30 days
node
32
OpenAI (training)
1
Resources
types-aiobotocore-sts — pip install types-aiobotocore-sts · libregistry