{"id":24761,"library":"types-aiobotocore-wafv2","title":"types-aiobotocore-wafv2","description":"Type annotations for aiobotocore WAFV2 service (version 3.5.0), generated by mypy-boto3-builder 8.12.0. Provides static typing stubs for AWS WAFV2 async client and service resources when using aiobotocore. Compatible with Python >=3.9.","status":"active","version":"3.5.0","language":"python","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["aws","aiobotocore","wafv2","type-hints","mypy","boto3"],"install":[{"cmd":"pip install 'types-aiobotocore-wafv2'","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Runtime dependency for AWS SDK interactions; stubs are used with aiobotocore.","package":"aiobotocore","optional":false},{"reason":"Required for Python 3.9 compatibility with certain type constructs.","package":"typing-extensions","optional":true}],"imports":[{"note":"WAFV2Client is exported at package level, not from a submodule.","wrong":"from types_aiobotocore_wafv2.client import WAFV2Client","symbol":"WAFV2Client","correct":"from types_aiobotocore_wafv2 import WAFV2Client"},{"note":"Service resource class is defined in the stubs package, not in aiobotocore itself.","wrong":"from aiobotocore.client import WAFV2ServiceResource","symbol":"WAFV2ServiceResource","correct":"from types_aiobotocore_wafv2 import WAFV2ServiceResource"}],"quickstart":{"code":"import os\nfrom types_aiobotocore_wafv2 import WAFV2Client\n\nasync def get_web_acls():\n    # Replace with actual credentials\n    session = aiobotocore.session.AioSession()\n    async with session.create_client('wafv2', region_name='us-east-1',\n                                      aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID', ''),\n                                      aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY', '')) as client:\n        # client is now type-annotated as WAFV2Client\n        result = await client.list_web_acls(Scope='REGIONAL')\n        return result['WebACLs']","lang":"python","description":"Async client initialization with type annotations for WAFV2."},"warnings":[{"fix":"Update any hardcoded type names to match the new shorter pattern. Check your type hints for any RequestRequestTypeDef suffixes.","message":"Version 8.9.0 of the builder introduced breaking changes: TypeDefs for packed method arguments use shorter names (e.g., CreateDistributionRequestRequestTypeDef -> CreateDistributionRequestTypeDef). This affects type definitions inherited from the builder.","severity":"breaking","affected_versions":">=3.5.0"},{"fix":"Upgrade your Python runtime to 3.9 or later.","message":"Python 3.8 support was removed in version 8.12.0. This package requires Python >=3.9.","severity":"deprecated","affected_versions":">=3.5.0"},{"fix":"Install aiobotocore (e.g., pip install aiobotocore) alongside this stubs package.","message":"The package only provides type stubs. It does not include the actual aiobotocore client implementation. You must have aiobotocore and boto3 installed separately.","severity":"gotcha","affected_versions":"all"},{"fix":"Use import from types_aiobotocore_wafv2, not from types_aiobotocore_wafv2 (can't import with hyphens).","message":"The top-level package name is types_aiobotocore_wafv2 (with underscores), not types-aiobotocore-wafv2 (with hyphens). Python import paths use underscores.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"pip install types-aiobotocore-wafv2","cause":"The stubs package is not installed. It must be installed separately from aiobotocore.","error":"ModuleNotFoundError: No module named 'types_aiobotocore_wafv2'"},{"fix":"Check if the correct import is 'from types_aiobotocore_wafv2 import WAFV2Client'. If still failing, check the package version compatibility with aiobotocore.","cause":"The client class may have a different name or be located in a submodule. Usually it's at the top level.","error":"ImportError: cannot import name 'WAFV2Client' from 'types_aiobotocore_wafv2'"},{"fix":"Avoid isinstance checks against type aliases from stubs; use duck-typing or reference the actual boto3 types.","cause":"The stubs use TypeAlias annotations (e.g., from typing) which are not intended for runtime isinstance checks.","error":"TypeError: Type aliases cannot be used with isinstance()"},{"fix":"Ensure types-aiobotocore-wafv2 is installed and matches the aiobotocore version. Check that you are using the async client correctly (async with session.create_client).","cause":"The async client is not properly typed; likely a missing stubs package or version mismatch.","error":"AttributeError: 'AioBaseClient' object has no attribute 'list_web_acls'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}