{"id":22491,"library":"types-boto3-sts","title":"types-boto3-sts","description":"Type annotations for boto3 STS service, generated by mypy-boto3-builder. Provides type hints for AWS Security Token Service (STS) to enable static type checking with mypy or pyright. Current version 1.42.91, requires Python >=3.9. Released as part of the mypy-boto3-builder ecosystem; follows boto3 releases closely.","status":"active","version":"1.42.91","language":"python","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["boto3","sts","type-annotations","aws","mypy","pyright"],"install":[{"cmd":"pip install types-boto3-sts","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"","wrong":"","symbol":"STSClient","correct":"from mypy_boto3_sts import STSClient"},{"note":"","wrong":"","symbol":"GetCallerIdentityResultTypeDef","correct":"from mypy_boto3_sts.type_defs import GetCallerIdentityResultTypeDef"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_sts import STSClient\n\nclient: STSClient = boto3.client('sts', region_name='us-east-1', aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID', ''), aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY', ''))\nresponse = client.get_caller_identity()\nprint(f\"Account: {response['Account']}\")","lang":"python","description":"Create an STS client with type hints and call get_caller_identity."},"warnings":[{"fix":"Update imports to use the new TypeDef names (remove duplicate 'Request' suffix).","message":"Generated type definitions for method arguments and TypeDefs changed in builder v8.9.0: shorter names (e.g., CreateDistributionRequestTypeDef instead of CreateDistributionRequestRequestTypeDef). Existing code using old TypeDef names will break.","severity":"breaking","affected_versions":">=8.9.0"},{"fix":"Upgrade to Python >=3.9.","message":"Removed support for Python 3.8 as of mypy-boto3-builder v8.12.0.","severity":"breaking","affected_versions":">=8.12.0"},{"fix":"Ensure boto3 is in your dependencies: pip install boto3.","message":"This package provides type hints only; you must also install boto3 at runtime. The package itself does not include any runtime code.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run 'pip install types-boto3-sts' and import as 'from mypy_boto3_sts import ...'.","cause":"The package is installed as 'types-boto3-sts' but the import uses 'mypy_boto3_sts'.","error":"ModuleNotFoundError: No module named 'mypy_boto3_sts'"},{"fix":"Ensure types-boto3-sts is installed and your type checker (mypy, pyright) is configured to use stubs.","cause":"IDE or type checker not recognizing the stub package.","error":"Cannot find reference 'STSClient' in '__init__.py'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}