{"id":3599,"library":"mypy-boto3-iotsitewise","title":"mypy-boto3-iotsitewise Type Stubs","description":"mypy-boto3-iotsitewise provides PEP 561 compliant type annotations for the AWS boto3 IoTSiteWise service, generated by the mypy-boto3-builder. It enhances type checking for `boto3.client('iotsitewise')` calls, enabling robust static analysis with tools like mypy and pyright, and improving IDE auto-completion. This library is actively maintained, with versions closely synchronized with upstream boto3 releases.","status":"active","version":"1.42.3","language":"python","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["AWS","boto3","mypy","type checking","IoT","IoTSiteWise","stubs"],"install":[{"cmd":"pip install mypy-boto3-iotsitewise","lang":"bash","label":"Install standalone stubs"},{"cmd":"pip install 'boto3-stubs[iotsitewise]'","lang":"bash","label":"Install as part of boto3-stubs (recommended for multiple services)"}],"dependencies":[{"reason":"This package provides type stubs for the boto3 library's IoTSiteWise client.","package":"boto3","optional":false},{"reason":"Requires Python 3.9 or newer due to removal of Python 3.8 support in mypy-boto3-builder 8.12.0.","package":"python","optional":false}],"imports":[{"wrong":"from mypy_boto3_iotsitewise.client import IoTSiteWiseClient","symbol":"IoTSiteWiseClient","correct":"from mypy_boto3_iotsitewise import IoTSiteWiseClient"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_iotsitewise.client import IoTSiteWiseClient\n\ndef get_iotsitewise_client() -> IoTSiteWiseClient:\n    \"\"\"Get a type-hinted AWS IoT SiteWise client.\"\"\"\n    # Ensure AWS credentials are set up (e.g., via environment variables or ~/.aws/credentials)\n    client: IoTSiteWiseClient = boto3.client(\n        \"iotsitewise\",\n        region_name=\"us-east-1\", # Replace with your desired region\n        aws_access_key_id='YOUR_ACCESS_KEY' or os.environ.get('AWS_ACCESS_KEY_ID', ''),\n        aws_secret_access_key='YOUR_SECRET_KEY' or os.environ.get('AWS_SECRET_ACCESS_KEY', ''),\n        aws_session_token='YOUR_SESSION_TOKEN' or os.environ.get('AWS_SESSION_TOKEN', '')\n    )\n    return client\n\nif __name__ == \"__main__\":\n    # Example usage: list assets (requires appropriate permissions)\n    try:\n        iotsitewise_client = get_iotsitewise_client()\n        response = iotsitewise_client.list_assets(maxResults=5)\n        print(\"Successfully retrieved IoT SiteWise assets:\")\n        for asset in response.get(\"assetSummaries\", []):\n            print(f\"  - {asset['name']} (ID: {asset['id']})\")\n    except Exception as e:\n        print(f\"Error interacting with IoT SiteWise: {e}\")","lang":"python","description":"This example demonstrates how to obtain a type-hinted IoTSiteWise client using `boto3` and `mypy-boto3-iotsitewise` for improved static analysis. It includes placeholder credential handling for a runnable example."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or newer.","message":"Support for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0. Users on Python 3.8 or older must upgrade to Python 3.9+ to use packages generated by this builder (including `mypy-boto3-iotsitewise` versions built with 8.12.0+).","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.12.0"},{"fix":"Ensure your environment and type checker are updated to support PEP 561. Reinstalling the stub package might be necessary.","message":"The `mypy-boto3-builder` migrated to PEP 561 compliant package structure in version 8.12.0. This change might affect how some build systems or older type checkers locate or process the stub packages.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.12.0"},{"fix":"Review and update any explicit TypeDef references in your codebase to match the new naming conventions.","message":"TypeDef naming conventions changed in `mypy-boto3-builder` 8.9.0. Specifically, redundant 'Request' suffixes were removed (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`), and 'Extra' postfixes were moved (e.g., `CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`). While the example refers to `Distribution`, this is a general change that may affect explicit references to generated TypeDefs for IoTSiteWise.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.9.0"},{"fix":"Prefer `boto3-stubs` with extras if using multiple AWS services, or standalone packages for single-service projects, and ensure you don't install both for the same service.","message":"The `mypy-boto3` ecosystem offers both standalone service packages (e.g., `mypy-boto3-iotsitewise`) and a consolidated `boto3-stubs` package with service-specific extras (e.g., `boto3-stubs[iotsitewise]`). Installing both for the same service can lead to conflicts or larger-than-necessary dependency graphs. Choose one method.","severity":"gotcha","affected_versions":"All"},{"fix":"Always provide explicit type annotations (e.g., `client: IoTSiteWiseClient = session.client(\"iotsitewise\")`) when using `boto3-stubs-lite` or individual `-lite` stub packages.","message":"If using `boto3-stubs-lite` (a more RAM-friendly variant), explicit type annotations for `session.client` and `session.resource` calls are *required* because it does not provide overloads for auto-discovery, unlike the full `boto3-stubs` or `mypy-boto3-` standalone packages.","severity":"gotcha","affected_versions":"All (when using -lite variants)"}],"env_vars":null,"search_vec":"'561':13 'activ':57 'analysi':41 'annot':16 'auto':52 'auto-complet':51 'aw':19,67 'boto3':3,9,20,28,65,68 'boto3.client':35 'builder':29 'call':37 'check':33,71 'close':61 'complet':53 'compliant':14 'enabl':38 'enhanc':31 'generat':23 'ide':50 'improv':49 'iot':72 'iotsitewis':4,10,21,36,73 'librari':55 'like':44 'maintain':58 'mypi':2,8,27,45,69 'mypy-boto3-builder':26 'mypy-boto3-iotsitewise':1,7 'pep':12 'provid':11 'pyright':47 'releas':66 'robust':39 'servic':22 'static':40 'stub':6,74 'synchron':62 'tool':43 'type':5,15,32,70 'upstream':64 'version':60","created_at":"2026-04-11T17:36:31.066280+00:00","updated_at":"2026-04-16T17:00:01.194510+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\n  File \"/tmp/tmphv1a31ow/venv/lib/python3.12/site-packages/mypy_boto3_iotsitewise/__init__.py\", line 90, in <module>\n    from .client import IoTSiteWiseClient\n  File \"/tmp/tmphv1a31ow/venv/lib/python3.12/site-packages/mypy_bot"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.43.59","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/youtype/mypy_boto3_builder","docs":"https://youtype.github.io/boto3_stubs_docs/mypy_boto3_iotsitewise/","changelog":null,"pypi":"https://pypi.org/project/mypy-boto3-iotsitewise/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["type-stubs","aws"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-08-29","next_check":"2026-07-10","install_tag":null}}