Registry / type-stubs / mypy-boto3-iotthingsgraph

mypy-boto3-iotthingsgraph

JSON →
library1.43.0pypypi✓ verified 22d ago

mypy-boto3-iotthingsgraph provides type annotations for the `boto3` IoTThingsGraph service client, compatible with static type checkers like MyPy, Pyright, and IDEs like VSCode and PyCharm. It helps in catching type-related errors early and improves code autocompletion. The library is actively maintained with releases frequently synchronized with `boto3` and its upstream `mypy-boto3-builder` versions.

pip install mypy-boto3-iotthingsgraph boto3
INSTALL
IMPORT
SIG · MYPY-BOTO3-IOTTHIN
M
mypy-boto3-iotthingsgraph
type-stubspythonv1.43.0
Install
3.9s avg
Import
576ms
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.592s · 52MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.9s · import 0.560s · 53MB
50MB installed
● package 50MB
Code
Verified usage

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

IoTThingsGraphClient
from mypy_boto3_iotthingsgraph.client import IoTThingsGraphClient
from boto3.client import IoTThingsGraphClient
Type stubs are imported from the `mypy_boto3_servicename` package, not directly from `boto3`.
ListFlowTemplatesResponseTypeDef
from mypy_boto3_iotthingsgraph.type_defs import ListFlowTemplatesResponseTypeDef
Specific TypeDefs for API response structures are available in the `type_defs` submodule.
TYPE_CHECKING
from typing import TYPE_CHECKING
It is best practice to import type stubs only within `if TYPE_CHECKING:` blocks to avoid runtime dependencies.

This quickstart demonstrates how to use `mypy-boto3-iotthingsgraph` to add type hints to a boto3 IoTThingsGraph client. The `IoTThingsGraphClient` type from `mypy_boto3_iotthingsgraph.client` is used to explicitly type the `boto3.client('iotthingsgraph')` instance, enabling autocompletion and static analysis. The `TYPE_CHECKING` block ensures that these type-only imports are excluded at runtime.

import boto3 from typing import TYPE_CHECKING if TYPE_CHECKING: from mypy_boto3_iotthingsgraph.client import IoTThingsGraphClient from mypy_boto3_iotthingsgraph.type_defs import ListFlowTemplatesResponseTypeDef def get_iotthingsgraph_flow_templates() -> list[str]: client: IoTThingsGraphClient = boto3.client('iotthingsgraph') response: ListFlowTemplatesResponseTypeDef = client.list_flow_templates() template_names = [t['id'] for t in response.get('flowTemplates', [])] return template_names # Example usage (will not run without AWS credentials and actual resources) # print(get_iotthingsgraph_flow_templates())
Debug
Known issues
breakingPython 3.8 support has been removed since `mypy-boto3-builder 8.12.0`, which `mypy-boto3-iotthingsgraph 1.42.3` is based on. Projects requiring type stubs must now use Python 3.9 or higher.
fix
Upgrade your Python environment to 3.9 or newer. Ensure your `requires_python` matches in your project configuration.
affects: mypy-boto3-builder >=8.12.0, mypy-boto3-iotthingsgraph >=1.42.3
breakingThe `mypy-boto3-builder` project migrated to PEP 561 compliant packages. While this generally improves compatibility with type checkers, users relying on specific older mechanisms for stub discovery might need to adjust their `mypy` configuration or package installation methods.
fix
Ensure your type checker (e.g., MyPy) is up-to-date. If issues persist, verify that your project structure and `py.typed` markers (if applicable for custom setups) align with PEP 561 guidelines.
affects: mypy-boto3-builder >=8.12.0, mypy-boto3-iotthingsgraph >=1.42.3
breakingTypeDef naming conventions were changed in `mypy-boto3-builder 8.9.0`. For example, `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`, and conflicting `Extra` postfixes were moved. This affects all generated type stubs, including IoTThingsGraph, potentially breaking existing type annotations for complex input/output structures.
fix
Review and update `TypeDef` imports and usage in your codebase to match the new, shorter naming conventions as described in the release notes or the generated stub files.
affects: mypy-boto3-builder >=8.9.0, mypy-boto3-iotthingsgraph >=1.38.0 (approx.)
gotchaThe `mypy-boto3-iotthingsgraph` package provides *only* type annotations. You must install `boto3` separately to have the actual runtime AWS SDK functionality.
fix
Always install both `boto3` and `mypy-boto3-iotthingsgraph` in your development environment: `pip install boto3 mypy-boto3-iotthingsgraph`.
affects: All
gotchaTo avoid adding `mypy-boto3-iotthingsgraph` as a runtime dependency to your deployed application, it is best practice to wrap all type stub imports within `if TYPE_CHECKING:` blocks.
fix
Use `from typing import TYPE_CHECKING` and enclose `from mypy_boto3_...` imports inside an `if TYPE_CHECKING:` block. Your production environment only needs `boto3`.
affects: All
deprecatedThe 'legacy `mypy-boto3`' packages were moved to a separate product and are no longer generated alongside `boto3-stubs` by the builder. If you were using the older `mypy-boto3` umbrella package, you should migrate to specific service packages like `mypy-boto3-iotthingsgraph` or the meta-package `boto3-stubs`.
fix
Uninstall any legacy `mypy-boto3` packages and install the appropriate `mypy-boto3-servicename` packages or `boto3-stubs` with extras for the services you use.
affects: mypy-boto3-builder >=8.9.0
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredRuntime dependency for AWS SDK functionality, `mypy-boto3-iotthingsgraph` provides only type stubs for it.
Agent activity
18 hits · last 30 days
node
16
OpenAI (training)
1
Resources
mypy-boto3-iotthingsgraph — pip install mypy-boto3-iotthingsgraph · libregistry