{"id":3078,"library":"mypy-boto3-dynamodbstreams","title":"Type annotations for boto3 DynamoDBStreams","description":"mypy-boto3-dynamodbstreams provides comprehensive type annotations for the AWS boto3 DynamoDBStreams client, enhancing static analysis and developer experience for DynamoDB Streams operations. It is currently at version 1.42.3, generated by mypy-boto3-builder 8.12.0, with frequent releases aligning with boto3 updates and builder improvements.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["aws","boto3","mypy","type-hints","dynamodb","dynamodbstreams"],"install":[{"cmd":"pip install mypy-boto3-dynamodbstreams","lang":"bash","label":"Install library"}],"dependencies":[{"reason":"This package provides type stubs for boto3; boto3 itself must be installed to use the AWS SDK functionality.","package":"boto3","optional":false},{"reason":"Required for backporting new typing features to older Python versions (though less critical for Python 3.9+).","package":"typing-extensions","optional":true}],"imports":[{"symbol":"DynamoDBStreamsClient","correct":"from mypy_boto3_dynamodbstreams.client import DynamoDBStreamsClient"},{"symbol":"RecordTypeDef","correct":"from mypy_boto3_dynamodbstreams.type_defs import RecordTypeDef"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_dynamodbstreams.client import DynamoDBStreamsClient\nfrom mypy_boto3_dynamodbstreams.type_defs import DescribeStreamOutputTypeDef, ListStreamsOutputTypeDef\n\n\ndef get_dynamodb_streams_client() -> DynamoDBStreamsClient:\n    \"\"\"Get a typed DynamoDBStreams client.\"\"\"\n    client: DynamoDBStreamsClient = boto3.client(\"dynamodbstreams\")\n    return client\n\n\nif __name__ == \"__main__\":\n    # Example usage with type checking\n    ddb_streams_client = get_dynamodb_streams_client()\n\n    # List streams\n    list_response: ListStreamsOutputTypeDef = ddb_streams_client.list_streams(Limit=1)\n    print(\"DynamoDB Streams found:\", list_response.get(\"Streams\"))\n\n    # Describe a specific stream (replace with a real ARN if you have one)\n    if list_response.get(\"Streams\"):\n        stream_arn = list_response[\"Streams\"][0][\"StreamArn\"]\n        describe_response: DescribeStreamOutputTypeDef = ddb_streams_client.describe_stream(StreamArn=stream_arn)\n        print(f\"Description for {stream_arn}:\", describe_response.get(\"StreamDescription\"))\n","lang":"python","description":"This quickstart demonstrates how to initialize a type-hinted DynamoDBStreams client using `boto3` and leverage the provided `mypy-boto3-dynamodbstreams` type annotations for static analysis. It shows listing and describing streams."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or newer.","message":"Python 3.8 support has been removed across all `mypy-boto3` packages starting with `mypy-boto3-builder` version 8.12.0. Users on Python 3.8 will need to upgrade to Python 3.9 or newer.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.12.0"},{"fix":"Review your code for any custom type aliases or direct imports of specific TypeDef names and adjust to the new naming conventions if affected. Consult the specific service's `type_defs.pyi` for current names.","message":"Type definition (TypeDef) names for packed method arguments may have changed for brevity (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`) and conflicting TypeDef postfixes moved to the end (e.g., `CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`). While the examples are not for DynamoDBStreams, this is a general breaking change in the builder that could affect specific TypeDefs in any generated service.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.9.0"},{"fix":"Ensure `boto3` is installed in your environment: `pip install boto3`.","message":"This package only provides type annotations. You must install `boto3` separately for the actual AWS SDK functionality. The `mypy-boto3-dynamodbstreams` package is a `PEP 561` stub-only package.","severity":"gotcha","affected_versions":"All"},{"fix":"Ideally, keep `mypy-boto3-*` packages updated alongside `boto3`. The `mypy-boto3-builder` aims to align stub versions with `boto3` releases.","message":"For optimal type checking, ensure your `mypy-boto3-*` package versions are compatible with your installed `boto3` version. Mismatched versions can lead to incorrect or missing type hints.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}