Registry / type-stubs / mypy-boto3-sdb

mypy-boto3-sdb

JSON →
library1.43.0pypypi✓ verified 23d ago

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 boto3
INSTALL
IMPORT
SIG · MYPY-BOTO3-SDB
M
mypy-boto3-sdb
type-stubspythonv1.43.0
Install
3.8s avg
Import
570ms
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.594s · 51.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.8s · import 0.546s · 52MB
50MB installed
● package 50MB
Code
Verified usage

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

SimpleDBClient
from mypy_boto3_sdb.client import SimpleDBClient
AttributeTypeDef
from mypy_boto3_sdb.type_defs import AttributeTypeDef
from mypy_boto3_sdb.service_resource import AttributeTypeDef
Type definitions for service request/response objects are found in `type_defs`, not `service_resource` or `client`.

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.

import boto3 from mypy_boto3_sdb.client import SimpleDBClient from mypy_boto3_sdb.type_defs import SelectRequestRequestTypeDef, AttributeTypeDef def list_sdb_items(domain_name: str, select_expression: str) -> list[dict[str, str]] | None: """Fetches items from SimpleDB using type-hinted boto3 client.""" # A boto3 client is used at runtime, type-hinted by mypy-boto3-sdb sdb_client: SimpleDBClient = boto3.client("sdb") try: request: SelectRequestRequestTypeDef = { "SelectExpression": select_expression, "ConsistentRead": True, } response = sdb_client.select(**request) items_data = [] if "Items" in response and response["Items"]: for item in response["Items"]: item_dict = {"Name": item["Name"]} if "Attributes" in item and item["Attributes"]: for attr in item["Attributes"]: item_dict[attr["Name"]] = attr["Value"] items_data.append(item_dict) return items_data except Exception as e: print(f"Error fetching items: {e}") return None # Example usage (ensure 'boto3' is configured with AWS credentials) # results = list_sdb_items("my-domain", "select * from `my-domain`") # if results: # for item in results: # print(item)
Debug
Known issues
breakingSupport for Python 3.8 was officially removed in `mypy-boto3-builder` version 8.12.0 (and consequently `mypy-boto3-sdb` versions built with it). Projects requiring Python 3.8 should use older versions of `mypy-boto3-sdb`.
fix
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`).
affects: >=8.12.0
breakingVersion 8.9.0 of `mypy-boto3-builder` introduced significant breaking changes to `TypeDef` naming conventions (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`). This can break existing type hints in your codebase.
fix
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.
affects: >=8.9.0
gotchaThis package (`mypy-boto3-sdb`) provides *only* type stubs. It does not include the runtime `boto3` library. `boto3` must be installed separately for your code to function at runtime.
fix
Ensure `boto3` is included in your project's dependencies and installed alongside `mypy-boto3-sdb` (e.g., `pip install boto3 mypy-boto3-sdb`).
affects: *
gotchaFrom `mypy-boto3-builder` version 8.12.0, packages migrated to PEP 561 compliance. While this generally improves type checker discovery, older or custom `mypy` configurations might need adjustment (e.g., `mypy_path`) to correctly locate the stubs.
fix
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.
affects: >=8.12.0
gotchaDo not attempt to instantiate client classes (e.g., `SimpleDBClient`) directly from `mypy_boto3_sdb`. These are only type definitions. The actual runtime client must be created using `boto3.client('sdb')`.
fix
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')`.
affects: *
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredProvides the runtime functionality for interacting with AWS services; this package only provides type stubs.
mypyrequiredThe static type checker that utilizes these stubs.
typing-extensionsoptionalMay be required for full functionality on Python versions older than 3.9.
Agent activity
21 hits · last 30 days
node
18
Amazon
1
OpenAI (training)
1
Resources