Registry / type-stubs / mypy-boto3-memorydb

mypy-boto3-memorydb

JSON →
library1.43.0pypypi✓ verified 22d ago

mypy-boto3-memorydb provides type annotations for the AWS boto3 MemoryDB service, compatible with mypy, VSCode, PyCharm, and other type-checking tools. It offers comprehensive type hints for clients, paginators, waiters, and TypeDefs, ensuring better code quality and developer experience. The current version is 1.42.3 and it's actively maintained as part of the `mypy-boto3-builder` project, which releases updates in sync with boto3 service changes.

pip install mypy-boto3-memorydb boto3 mypy
INSTALL
IMPORT
SIG · MYPY-BOTO3-MEMORYD
M
mypy-boto3-memorydb
type-stubspythonv1.43.0
Install
7.6s avg
Import
609ms
Disk
116MB
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.910 runs
installs and imports cleanly · install 0.0s · import 0.637s · 118.1MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 7.6s · import 0.581s · 116MB
116MB installed
● package 116MB
Code
Verified usage

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

MemoryDBClient
from mypy_boto3_memorydb.client import MemoryDBClient
DescribeClustersPaginator
from mypy_boto3_memorydb.paginator import DescribeClustersPaginator
ResponseMetadataTypeDef
from mypy_boto3_memorydb.type_defs import ResponseMetadataTypeDef
from mypy_boto3_memorydb.client import ResponseMetadataTypeDef
Type definitions are in the `type_defs` submodule, not directly under `client`.
MemoryDBServiceName
from mypy_boto3_memorydb.literals import MemoryDBServiceName

This quickstart demonstrates how to initialize a MemoryDB client with type annotations. The `TYPE_CHECKING` block ensures that the type imports are only used by the type checker and do not introduce runtime dependencies. The client object `client` is explicitly annotated with `MemoryDBClient` for full type-checking and IDE auto-completion. This example creates a MemoryDB cluster.

import boto3 from typing import TYPE_CHECKING if TYPE_CHECKING: from mypy_boto3_memorydb.client import MemoryDBClient from mypy_boto3_memorydb.type_defs import CreateClusterResponseTypeDef def create_memorydb_cluster(cluster_name: str, node_type: str, num_shards: int) -> CreateClusterResponseTypeDef: client: MemoryDBClient = boto3.client("memorydb") response = client.create_cluster( ClusterName=cluster_name, NodeType=node_type, NumShards=num_shards, Engine="redis", SnapshotRetentionLimit=7, SubnetGroupName='default', ParameterGroupName='default.memorydb.redis6' ) print(f"Created MemoryDB cluster: {response['Cluster']['ClusterName']}") return response # Example usage (ensure you have AWS credentials configured) # create_memorydb_cluster("my-test-cluster", "db.r6g.large", 1)
Debug
Known issues
breakingPython 3.8 support has been removed in `mypy-boto3-builder` version 8.12.0, which generates `mypy-boto3-memorydb`. Consequently, this package (1.42.3 and newer) requires Python 3.9 or higher.
fix
Upgrade your Python environment to 3.9 or newer.
affects: mypy-boto3-builder >=8.12.0, mypy-boto3-memorydb >=1.42.0
breakingBreaking changes were introduced in `mypy-boto3-builder` 8.9.0 regarding TypeDef naming conventions. TypeDefs for packed method arguments use shorter names (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`), and conflicting `Extra` postfixes were moved (e.g., `CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`). This may require updates to existing type hints.
fix
Review and update your TypeDef imports and usages according to the new naming conventions. Refer to the specific service's `type_defs` documentation.
affects: mypy-boto3-builder >=8.9.0, mypy-boto3-memorydb matching that builder version
gotchaThis package provides *only type stubs*. You must install the `boto3` library separately for your code to run correctly. `mypy` is also required for static type checking.
fix
Ensure `boto3` and `mypy` are installed: `pip install boto3 mypy`.
affects: All versions
gotchaFor PyCharm users, if you experience slow performance due to `Literal` overloads, it is recommended to use the `boto3-stubs-lite` alternative, which provides a more RAM-friendly experience at the cost of requiring more explicit type annotations.
fix
Install `boto3-stubs-lite[memorydb]` instead: `pip install 'boto3-stubs-lite[memorydb]' boto3`.
affects: All versions, specifically affecting PyCharm users
gotchaFor optimal auto-completion and type checking in IDEs like VSCode or with older `mypy` versions, it's often necessary to use explicit type annotations for `boto3.client()` calls, as shown in the quickstart.
fix
Explicitly annotate `boto3.client()` return values with the corresponding `mypy-boto3-service.client` type (e.g., `client: MemoryDBClient = boto3.client('memorydb')`).
affects: All versions
gotchaThe version of `mypy-boto3-memorydb` (e.g., 1.42.3) indicates the `boto3` version it provides stubs for. However, the underlying `mypy-boto3-builder` version (e.g., 8.12.0) is independent and refers to the builder's own release cycle and features.
fix
When troubleshooting or reporting issues, be aware of both version numbers. The package version correlates to the `boto3` version, while the builder version indicates the generator's capabilities.
affects: All versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredProvides runtime functionality for AWS services; this package provides type stubs for it.
mypyoptionalA static type checker that utilizes these annotations.
pythonrequiredRequires Python 3.9 or newer.
Agent activity
23 hits · last 30 days
node
20
OpenAI (training)
1
Resources
mypy-boto3-memorydb — pip install mypy-boto3-memorydb · libregistry