Registry /
type-stubs / types-boto3-cognito-idp
Install & Compatibility
Where this runs
tested against v1.43.33 · 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.000s · 18.7MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.7s · import 0.000s · 19MB
17MB installed
● package 17MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
CognitoIdentityProviderClient
✓ from types_boto3_cognito_idp.client import CognitoIdentityProviderClient
✗ from mypy_boto3_cognito_idp.client import CognitoIdentityProviderClient
Type-annotated usage of CognitoIdentityProviderClient and AdminGetUserResponseTypeDef
import boto3
from mypy_boto3_cognito_idp.client import CognitoIdentityProviderClient
from mypy_boto3_cognito_idp.type_defs import AdminGetUserResponseTypeDef
def get_user_email(client: CognitoIdentityProviderClient, user_pool_id: str, username: str) -> str:
response: AdminGetUserResponseTypeDef = client.admin_get_user(
UserPoolId=user_pool_id,
Username=username
)
for attr in response.get('UserAttributes', []):
if attr['Name'] == 'email':
return attr['Value']
return ''
client: CognitoIdentityProviderClient = boto3.client('cognito-idp')
email = get_user_email(client, os.environ.get('USER_POOL_ID', ''), os.environ.get('USERNAME', ''))
print(email)
Debug
Known issues
gotchaDo NOT import 'CognitoIdentityProviderClient' directly from 'boto3'. The boto3 package does not export it; you must import from 'mypy_boto3_cognito_idp.client'. Without this, static type checkers (mypy, pyright) will not recognise the type.fixUse 'from mypy_boto3_cognito_idp.client import CognitoIdentityProviderClient'
affects: all
breakingVersion 8.9.0 of mypy-boto3-builder renamed many TypeDefs by dropping redundant 'Request' suffixes (breaking change). For example, 'AdminGetUserRequestRequestTypeDef' became 'AdminGetUserRequestTypeDef'. If you pinned to an older types-boto3-cognito-idp, you may need to update your typings.fixRename imports: remove duplicate 'Request' in TypeDef names. For version-specific TypeDefs, check the generated stubs.
affects: >=1.34.0 (generated by builder 8.9.0+)
gotchaTypeDefs for paginators (e.g., ListUsersPaginator) require importing from the paginator submodule, not from type_defs. Using the wrong module will cause mypy errors.fixUse 'from mypy_boto3_cognito_idp.paginator import ListUsersPaginator' for paginator types, and 'from mypy_boto3_cognito_idp.type_defs import ...' for service response/request types.
affects: all
deprecatedPython 3.8 support was removed in builder version 8.12.0. types-boto3-cognito-idp requires Python >=3.9.fixUpgrade to Python 3.9+ or pin to an older version of the stubs (e.g., 1.34.0) if you still need 3.8.
affects: >=1.43.0
gotchaThe package name 'types-boto3-cognito-idp' is used for Boto3 v1 stubs. For aioboto3, use 'types-aioboto3-cognito-idp' instead. Mixing them leads to missing stubs.fixInstall the correct package: 'pip install types-aioboto3-cognito-idp' if you use aioboto3.
affects: all
Upgrade
Version history
1.43.33latest on PyPI · released Jun 18, 2026
Audit
Dependencies
boto3optionalRuntime dependency; stubs annotate boto3 service client
typing-extensionsoptionalRequired for Python <3.11 for NotRequired and other PEP 604 features