Skip to content

Examples#

Index > FraudDetector > Examples

Auto-generated documentation for FraudDetector type annotations stubs module mypy-boto3-frauddetector.

Client#

Implicit type annotations#

Can be used with boto3-stubs[frauddetector] package installed.

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

# FraudDetectorClient usage example

from boto3.session import Session


session = Session()

client = session.client("frauddetector")  # (1)
result = client.batch_create_variable()  # (2)
  1. client: FraudDetectorClient
  2. result: BatchCreateVariableResultTypeDef

Explicit type annotations#

With boto3-stubs-lite[frauddetector] or a standalone mypy_boto3_frauddetector package, you have to explicitly specify client: FraudDetectorClient 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.

# FraudDetectorClient usage example with type annotations

from boto3.session import Session

from mypy_boto3_frauddetector.client import FraudDetectorClient
from mypy_boto3_frauddetector.type_defs import BatchCreateVariableResultTypeDef
from mypy_boto3_frauddetector.type_defs import BatchCreateVariableRequestRequestTypeDef


session = Session()

client: FraudDetectorClient = session.client("frauddetector")

kwargs: BatchCreateVariableRequestRequestTypeDef = {...}
result: BatchCreateVariableResultTypeDef = client.batch_create_variable(**kwargs)