mypy-boto3-sdb provides type annotations (stubs) for the boto3 SimpleDB service. It helps developers write type-checked Python code when interacting with AWS SimpleDB using boto3, improving code quality and catching errors pre-runtime. The current version is 1.42.3, and it is updated frequently in sync with boto3 releases and the broader mypy-boto3-builder project.
pip install mypy-boto3-sdb boto3Verified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to use `mypy-boto3-sdb` to add type hints to a `boto3` SimpleDB client. It shows importing `SimpleDBClient` for the client type and `SelectRequestRequestTypeDef` for request parameters, ensuring type safety for `boto3` calls. Remember that `boto3` must be installed and configured separately for runtime execution.
Upgrade to Python 3.9 or newer, or pin `mypy-boto3-sdb` to a version compatible with Python 3.8 (e.g., `<8.12.0`).
Review and update all references to `TypeDef` imports and names in your type hints to conform to the new naming scheme. Most commonly, redundant 'Request' or 'Response' suffixes might have been shortened.
Ensure `boto3` is included in your project's dependencies and installed alongside `mypy-boto3-sdb` (e.g., `pip install boto3 mypy-boto3-sdb`).
Ensure `mypy` is up-to-date. If encountering issues, verify `mypy` is correctly configured to find installed stub packages, and consider clearing `mypy` cache or checking `mypy`'s discovery paths.
Always create AWS clients using `boto3.client('service_name')` and then apply the type hint from `mypy-boto3-sdb`, e.g., `client: SimpleDBClient = boto3.client('sdb')`.