{"id":3361,"library":"mypy-boto3-frauddetector","title":"mypy-boto3-frauddetector type stubs","description":"mypy-boto3-frauddetector provides comprehensive type annotations for the `boto3` AWS FraudDetector service. Generated by `mypy-boto3-builder`, it offers static type checking for clients, resources, paginators, and waiters, significantly improving developer experience with tools like Mypy, Pyright, VSCode, and PyCharm. The library is actively maintained, with frequent updates aligning with `boto3` and `botocore` releases.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["boto3","aws","type-stubs","mypy","frauddetector","typing","pep-561"],"install":[{"cmd":"pip install boto3 mypy-boto3-frauddetector","lang":"bash","label":"Install with boto3"}],"dependencies":[{"reason":"Runtime dependency for the AWS SDK for Python.","package":"boto3","optional":false},{"reason":"Required for older Python versions (e.g., <3.11) to support advanced typing features if used in generated stubs.","package":"typing-extensions","optional":true}],"imports":[{"symbol":"FraudDetectorClient","correct":"from mypy_boto3_frauddetector import FraudDetectorClient"},{"note":"For literal types like enum values.","symbol":"AsyncJobStatusType","correct":"from mypy_boto3_frauddetector.literals import AsyncJobStatusType"},{"note":"For TypedDicts representing service request/response structures.","symbol":"ATIMetricDataPointTypeDef","correct":"from mypy_boto3_frauddetector.type_defs import ATIMetricDataPointTypeDef"}],"quickstart":{"code":"import os\nfrom typing import TYPE_CHECKING\nfrom boto3.session import Session\n\n# Only import type stubs during type checking\nif TYPE_CHECKING:\n    from mypy_boto3_frauddetector import FraudDetectorClient\n    from mypy_boto3_frauddetector.type_defs import GetEventTypesResultTypeDef\n\n# Instantiate a boto3 session (credentials are handled by boto3's default chain)\nsession = Session(\n    aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID', 'DUMMY_KEY'),\n    aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY', 'DUMMY_SECRET'),\n    region_name=os.environ.get('AWS_DEFAULT_REGION', 'us-east-1')\n)\n\n# Get the FraudDetector client with type annotations\nclient: 'FraudDetectorClient' = session.client(\"frauddetector\")\n\ntry:\n    # Example API call with type-hinted response\n    response: 'GetEventTypesResultTypeDef' = client.get_event_types()\n    print(\"Successfully retrieved FraudDetector event types.\")\n    for event_type in response.get('EventTypes', []):\n        print(f\" - Event Type: {event_type.get('Name')}\")\nexcept Exception as e:\n    print(f\"Error retrieving FraudDetector event types: {e}\")\n","lang":"python","description":"This example demonstrates how to initialize a FraudDetector client with explicit type annotations and make a simple API call (`get_event_types`). The `TYPE_CHECKING` guard ensures the type stub package is only imported for static analysis, avoiding a runtime dependency. Replace `DUMMY_KEY` and `DUMMY_SECRET` with actual credentials or ensure standard AWS credential providers are configured."},"warnings":[{"fix":"Upgrade your Python environment to version 3.9 or later.","message":"`mypy-boto3-builder` 8.12.0 and later versions removed support for Python 3.8 across all generated packages. This package (1.42.3) requires Python 3.9 or newer.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.12.0"},{"fix":"Update your TypedDict imports and usage to reflect the new naming conventions, consulting the service's documentation if necessary.","message":"Starting with `mypy-boto3-builder` 8.9.0, TypedDict names for method arguments may have changed (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`). Additionally, conflicting `Extra` postfixes were moved (`CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`).","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.9.0"},{"fix":"To fix this, assign `object` to the type-hinted variables in the `else` branch: `if TYPE_CHECKING: from mypy_boto3_frauddetector import FraudDetectorClient else: FraudDetectorClient = object`.","message":"When using `if TYPE_CHECKING:` to prevent runtime stub imports, Pylint might report 'undefined variable' errors for the type-hinted objects.","severity":"gotcha","affected_versions":"All versions"},{"fix":"If experiencing performance problems in PyCharm, consider installing the `boto3-stubs-lite` version (e.g., `pip install 'boto3-stubs-lite[frauddetector]'`) which is more RAM-friendly but requires explicit type annotations for session clients/resources.","message":"PyCharm has known performance issues with `Literal` overloads (issue PY-40997) when using full `mypy-boto3-*` packages.","severity":"gotcha","affected_versions":"All versions with PyCharm"},{"fix":"Always add explicit type annotations for `boto3` client and resource objects.","message":"While `boto3-stubs` often auto-discovers types for `session.client()` or `boto3.client()`, explicit type annotations for the client object (e.g., `client: FraudDetectorClient = ...`) are highly recommended for optimal IDE auto-completion and strict type checking, especially with `boto3-stubs-lite` variants.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}