Skip to content

Examples#

Index > WAFRegional > Examples

Auto-generated documentation for WAFRegional type annotations stubs module types-aiobotocore-waf-regional.

Client#

Implicit type annotations#

Can be used with types-aiobotocore[waf-regional] package installed.

Write your WAFRegional code as usual, type checking and code completion should work out of the box.

# WAFRegionalClient usage example

from aiobotocore.session import get_session


session = get_session()

async with session.create_client("waf-regional") as client:  # (1)
    result = await client.create_byte_match_set()  # (2)
  1. client: WAFRegionalClient
  2. result: CreateByteMatchSetResponseTypeDef

Explicit type annotations#

With types-aiobotocore-lite[waf-regional] or a standalone types_aiobotocore_waf_regional package, you have to explicitly specify client: WAFRegionalClient type annotation.

All other type annotations are optional, as types should be discovered automatically. However, these type annotations can be helpful in your functions and methods.

# WAFRegionalClient usage example with type annotations

from aiobotocore.session import get_session

from types_aiobotocore_waf_regional.client import WAFRegionalClient
from types_aiobotocore_waf_regional.type_defs import CreateByteMatchSetResponseTypeDef
from types_aiobotocore_waf_regional.type_defs import CreateByteMatchSetRequestRequestTypeDef


session = get_session()

async with session.create_client("waf-regional") as client:
    client: WAFRegionalClient
    kwargs: CreateByteMatchSetRequestRequestTypeDef = {...}
    result: CreateByteMatchSetResponseTypeDef = await client.create_byte_match_set(**kwargs)