Registry / type-stubs / mypy-boto3-waf-regional

mypy-boto3-waf-regional

JSON →
library1.43.0pypypi✓ verified 24d ago

Provides static type annotations for the 'waf-regional' service of `boto3`, enabling robust type checking for AWS WAFRegional client interactions with tools like Mypy. This package is part of the `mypy-boto3` ecosystem, currently at version 1.42.3, and updates in sync with `boto3` releases via the `mypy-boto3-builder`.

pip install mypy-boto3-waf-regional boto3
INSTALL
IMPORT
SIG · MYPY-BOTO3-WAF-REG
M
mypy-boto3-waf-regional
type-stubspythonv1.43.0
Install
3.8s avg
Import
603ms
Disk
50MB
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.632s · 52.1MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.8s · import 0.574s · 53MB
50MB installed
● package 50MB
Code
Verified usage

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

WAFRegionalClient
from mypy_boto3_waf_regional import WAFRegionalClient
Type for the 'waf-regional' client returned by boto3.client().
ListRulesResponseTypeDef
from mypy_boto3_waf_regional.type_defs import ListRulesResponseTypeDef
Example of importing a specific TypeDef for AWS WAFRegional API responses.

Demonstrates how to initialize a `boto3` WAFRegional client with type annotations and perform a simple API call. The `TYPE_CHECKING` block ensures type hints are only processed by static analyzers, while the `else` block provides runnable runtime code with basic error handling and region setup for `boto3`.

import boto3 from mypy_boto3_waf_regional import WAFRegionalClient from typing import TYPE_CHECKING import os # Ensure AWS region is set for boto3, e.g., via environment variable or ~/.aws/config os.environ.setdefault('AWS_REGION', os.environ.get('AWS_REGION', 'us-east-1')) if TYPE_CHECKING: # This block is for static type checking only, not executed at runtime. # 'client' will be type-checked as WAFRegionalClient. client: WAFRegionalClient = boto3.client("waf-regional") # Example of a type-checked API call; type checkers will validate arguments and response. response = client.list_rules() print(response.get('Rules')) # Type checker knows 'Rules' is a key here else: # This block runs at runtime. The type hint helps IDEs and linters. client: WAFRegionalClient = boto3.client("waf-regional") try: # Attempt a non-destructive API call to demonstrate functionality. response = client.list_rules() print(f"Successfully listed WAFRegional rules: {len(response.get('Rules', []))} rules found.") except Exception as e: print(f"Error listing WAFRegional rules (check AWS credentials and region): {e}") print("To run this code, ensure AWS credentials are configured (e.g., via AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION environment variables).")
Debug
Known issues
breakingPython 3.8 support was removed from `mypy-boto3-builder` (and thus all generated stub packages) starting from version 8.12.0. Users on Python 3.8 must upgrade to Python 3.9 or newer.
fix
Upgrade your Python environment to 3.9 or a later version to use newer stub versions.
affects: mypy-boto3-builder >= 8.12.0 (affecting all mypy-boto3-* stub packages)
breakingBreaking changes to `TypeDef` naming conventions occurred in `mypy-boto3-builder` 8.9.0. If you directly imported and used generated `TypeDef`s, their names might have been shortened or rearranged (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`).
fix
Review your code for direct `TypeDef` imports and adjust names according to the updated stub definitions found in the `mypy_boto3_waf_regional.type_defs` module.
affects: mypy-boto3-builder >= 8.9.0 (affecting all mypy-boto3-* stub packages)
gotchaThese `mypy-boto3-*` packages provide only type annotations for static analysis; they do not include the runtime functionality. You must also install the corresponding `boto3` (or `aioboto3` for async stubs) package for your application to run.
fix
Ensure `pip install boto3` is part of your project's dependencies alongside the stub package.
affects: All versions
gotchaThe `mypy-boto3` ecosystem migrated to PEP 561 compliant packages in `mypy-boto3-builder` 8.12.0. While this is primarily an internal change for package distribution, it might affect how some older build tools or specific `mypy` configurations locate and utilize type stubs.
fix
Ensure your `mypy` and Python environment are up to date. If issues arise, verify `mypy`'s `follow_imports` configuration or clear any cached environments.
affects: mypy-boto3-builder >= 8.12.0 (affecting all mypy-boto3-* stub packages)
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredRuntime dependency for the AWS SDK for Python, which these stubs type-check.
Agent activity
14 hits · last 30 days
node
10
Amazon
2
OpenAI (training)
1
Resources
mypy-boto3-waf-regional — pip install mypy-boto3-waf-regional · libregistry