Registry / type-stubs / mypy-boto3-waf

mypy-boto3-waf

JSON →
library1.43.0pypypi✓ verified 24d ago

mypy-boto3-waf provides type annotations for the AWS WAF service client in boto3, enabling static type checking with tools like Mypy. It is part of the mypy-boto3-builder project, which generates stubs for all boto3 services. The library is actively maintained, with version 1.42.3 available, and releases are frequent, typically aligned with updates to boto3 and the builder itself.

pip install mypy-boto3-waf
INSTALL
IMPORT
SIG · MYPY-BOTO3-WAF
M
mypy-boto3-waf
type-stubspythonv1.43.0
Install
1.7s avg
Import
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.43.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.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.7s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage

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

WAFClient
from mypy_boto3_waf import WAFClient
from mypy_boto3_waf import WAFClient

This quickstart demonstrates how to import and use the type hints for the AWS WAF client. By annotating the boto3 client with `WAFClient`, Mypy can provide static analysis for WAF service calls, ensuring correct parameter types and return values.

import boto3 from mypy_boto3_waf.client import WAFClient def get_waf_webacls() -> None: # mypy will now correctly type-check 'client' client: WAFClient = boto3.client("waf") try: response = client.list_web_acls() for web_acl in response.get("WebACLs", []): print(f"WebACL Name: {web_acl['Name']}, ID: {web_acl['WebACLId']}") except Exception as e: print(f"Error listing WebACLs: {e}") if __name__ == "__main__": get_waf_webacls()
Debug
Known issues
breakingSupport for Python 3.8 has been officially removed starting from mypy-boto3-builder 8.12.0 (which generated mypy-boto3-waf 1.42.3). Users on Python 3.8 will need to upgrade their Python version to 3.9 or higher.
fix
Upgrade your Python environment to 3.9 or newer. If this is not possible, pin to an older `mypy-boto3-waf` version (e.g., `<1.42.3`) that supported Python 3.8.
affects: >=1.42.3
breakingTypeDef naming conventions were changed in mypy-boto3-builder 8.9.0. TypeDefs for packed method arguments now use shorter names (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`). Additionally, conflicting `Extra` postfixes were moved to the end (e.g., `CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`).
fix
Update explicit references to TypeDef names in your code to match the new shorter or reordered conventions. Consult the `mypy_boto3_waf.type_defs` module for the correct names.
affects: >=1.38.0 (generated by builder 8.9.0)
gotchaThe library migrated to PEP 561 compliance in mypy-boto3-builder 8.12.0. While this generally improves stub discovery for Mypy, users who previously configured custom `mypy_path` entries for `mypy-boto3` stubs might experience conflicts or incorrect stub loading. Mypy should now automatically discover these stubs if installed correctly.
fix
Remove any explicit `mypy_path` configurations pointing to `mypy-boto3` or `mypy-boto3-waf` stubs from your `mypy.ini` or CLI arguments, and rely on Mypy's automatic PEP 561 stub discovery.
affects: >=1.42.3
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredProvides the AWS SDK for Python, which these stubs type-check.
mypyoptionalThe static type checker that utilizes these stubs.
typing_extensionsoptionalRequired for full compatibility with Python versions < 3.11.
Agent activity
23 hits · last 30 days
node
20
Amazon
1
OpenAI (training)
1
Resources