Registry / type-stubs / mypy-boto3-cognito-idp

mypy-boto3-cognito-idp

JSON →
library1.43.82pypypi✓ verified 23d ago

mypy-boto3-cognito-idp provides comprehensive type annotations for the `boto3` library's Cognito Identity Provider service. It enables static type checking with tools like mypy and pyright, offering enhanced auto-completion and early error detection in IDEs for `boto3` calls related to Cognito IDP. The library, currently at version 1.42.59, is auto-generated by `mypy-boto3-builder` and frequently updated to synchronize with `boto3` releases, ensuring up-to-date and accurate type definitions.

pip install mypy-boto3-cognito-idp
INSTALL
IMPORT
SIG · MYPY-BOTO3-COGNITO
M
mypy-boto3-cognito-idp
type-stubspythonv1.43.82
Install
3.4s avg
Import
Disk
18MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.43.82 · 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.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 20.2MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 3.4s · import 0.000s · 21MB
18MB installed
● package 18MB
Code
Verified usage

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

CognitoIdentityProviderClient
from mypy_boto3_cognito_idp import CognitoIdentityProviderClient
from mypy_boto3_cognito_idp import CognitoIdentityProviderClient

This quickstart demonstrates how to obtain a type-hinted `CognitoIdentityProviderClient` using `boto3.session.Session().client()` with explicit type annotations for static analysis. This pattern allows IDEs and type checkers to provide full autocompletion and validation for Cognito IDP service methods and their parameters.

import boto3 from boto3.session import Session from mypy_boto3_cognito_idp.client import CognitoIdentityProviderClient def get_cognito_idp_client(region_name: str = 'us-east-1') -> CognitoIdentityProviderClient: """Returns a type-hinted CognitoIdentityProvider client.""" # Actual boto3 client (runtime) session: Session = boto3.session.Session() client: CognitoIdentityProviderClient = session.client( "cognito-idp", region_name=region_name, aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID', ''), aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY', '') ) return client # Example usage if __name__ == "__main__": import os os.environ['AWS_ACCESS_KEY_ID'] = os.environ.get('AWS_ACCESS_KEY_ID', 'YOUR_ACCESS_KEY') os.environ['AWS_SECRET_ACCESS_KEY'] = os.environ.get('AWS_SECRET_ACCESS_KEY', 'YOUR_SECRET_KEY') cognito_client = get_cognito_idp_client() # You now have auto-completion and type checking for cognito_client methods # For example, cognito_client.list_user_pools() will show correct types. # response = cognito_client.list_user_pools(MaxResults=10) print(f"Client type: {type(cognito_client)}") # This client object now benefits from mypy-boto3 type hints.
Debug
Known issues
breakingPython 3.8 support was removed in `mypy-boto3-builder` version 8.12.0 and subsequent generated packages. Users on Python 3.8 will encounter issues and must upgrade to Python 3.9 or newer.
fix
Upgrade your Python environment to 3.9 or higher. If unable to upgrade, pin `mypy-boto3-cognito-idp` to an older compatible version (e.g., <1.42.59).
affects: >=8.12.0 of mypy-boto3-builder (which generates mypy-boto3-cognito-idp 1.42.59+)
breakingMigration to PEP 561 compliant packages in `mypy-boto3-builder` 8.12.0 might affect how type checkers discover stubs. While typically seamless, ensure your type checker configuration is up-to-date.
fix
Ensure your type checker (e.g., mypy, pyright) is updated to a recent version that fully supports PEP 561. Reinstalling stub packages might resolve discovery issues.
affects: >=8.12.0 of mypy-boto3-builder
gotchaThe `mypy-boto3-cognito-idp` package provides *only* type stubs. The actual `boto3` library must be installed separately in your environment for the code to run.
fix
Always ensure `boto3` is installed alongside `mypy-boto3-cognito-idp` (e.g., `pip install boto3 mypy-boto3-cognito-idp`).
affects: All versions
gotchaMismatching versions between your installed `boto3` library and `mypy-boto3-cognito-idp` can lead to inaccurate or missing type hints. `mypy-boto3` packages are versioned to match corresponding `boto3` versions.
fix
Install `mypy-boto3-cognito-idp` with a version that matches your `boto3` installation (e.g., if `boto3==1.42.59`, use `mypy-boto3-cognito-idp==1.42.59`). Consider using `boto3-stubs[boto3]` for automatic version synchronization.
affects: All versions
breakingIn `mypy-boto3-builder` 8.9.0, there were breaking changes to TypeDef naming conventions, including using shorter names for packed method arguments (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`) and moving the `Extra` postfix for conflicting TypeDefs.
fix
Review any explicit TypeDef imports or usage in your codebase, especially for request/response structures. Update to the new naming conventions as suggested by your type checker.
affects: >=8.9.0 of mypy-boto3-builder
gotchaPyCharm users may experience slow performance or high CPU usage due to how PyCharm handles Literal overloads. `boto3-stubs-lite` or disabling PyCharm's type checker in favor of `mypy` or `pyright` is recommended.
fix
If experiencing performance issues in PyCharm, install `boto3-stubs-lite[cognito-idp]` instead (if explicit type annotations are acceptable) or configure PyCharm to use an external type checker like `mypy` or `pyright`.
affects: All versions
Upgrade
Version history
1.43.82latest on PyPI · released Aug 27, 2026
Audit
Dependencies
boto3requiredProvides the actual AWS SDK for Python functionality; mypy-boto3-cognito-idp only provides type stubs.
pythonrequiredRequires Python 3.9 or newer. Support for Python 3.8 was removed in mypy-boto3-builder 8.12.0.
typing-extensionsoptionalMay be required for advanced type features, especially with older Python 3.9 versions, though typically managed by the builder's dependencies.
Agent activity
17 hits · last 30 days
node
14
OpenAI (training)
1
Resources
mypy-boto3-cognito-idp — pip install mypy-boto3-cognito-idp · libregistry