Examples
Auto-generated documentation for MemoryDB type annotations stubs module types-aiobotocore-memorydb.
Client
Implicit type annotations
Can be used with types-aioboto3[memorydb]
package installed.
Write your MemoryDB
code as usual,
type checking and code completion should work out of the box.
Client usage example
from aioboto3.session import Session
session = Session()
async with session.client("memorydb") as client: # (1)
result = await client.batch_update_cluster() # (2)
- client: MemoryDBClient
- result: BatchUpdateClusterResponseTypeDef
Explicit type annotations
With types-aioboto3-lite[memorydb]
or a standalone types_aiobotocore_memorydb
package, you have to explicitly specify
client: MemoryDBClient
type annotation.
All other type annotations are optional, as types should be discovered automatically. However, these type annotations can be helpful in your functions and methods.
Client usage example
from aioboto3.session import Session
from types_aiobotocore_memorydb.client import MemoryDBClient
from types_aiobotocore_memorydb.type_defs import BatchUpdateClusterResponseTypeDef
from types_aiobotocore_memorydb.type_defs import BatchUpdateClusterRequestRequestTypeDef
session = Session()
client: MemoryDBClient
async with session.client("memorydb") as client: # (1)
kwargs: BatchUpdateClusterRequestRequestTypeDef = {...} # (2)
result: BatchUpdateClusterResponseTypeDef = await client.batch_update_cluster(**kwargs) # (3)
- client: MemoryDBClient
- kwargs: BatchUpdateClusterRequestRequestTypeDef
- result: BatchUpdateClusterResponseTypeDef