Examples#
Index > BackupStorage > Examples
Auto-generated documentation for BackupStorage type annotations stubs module types-aiobotocore-backupstorage.
Client#
Implicit type annotations#
Can be used with types-aioboto3[backupstorage]
package installed.
Write your BackupStorage
code as usual,
type checking and code completion should work out of the box.
# BackupStorageClient usage example
from aioboto3.session import Session
session = Session()
async with session.client("backupstorage") as client: # (1)
result = await client.delete_object() # (2)
- client: BackupStorageClient
- result: EmptyResponseMetadataTypeDef
Explicit type annotations#
With types-aioboto3-lite[backupstorage]
or a standalone types_aiobotocore_backupstorage
package, you have to explicitly specify
client: BackupStorageClient
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.
# BackupStorageClient usage example with type annotations
from aioboto3.session import Session
from types_aiobotocore_backupstorage.client import BackupStorageClient
from types_aiobotocore_backupstorage.type_defs import EmptyResponseMetadataTypeDef
from types_aiobotocore_backupstorage.type_defs import DeleteObjectInputRequestTypeDef
session = Session()
client: BackupStorageClient
async with session.client("backupstorage") as client: # (1)
kwargs: DeleteObjectInputRequestTypeDef = {...} # (2)
result: EmptyResponseMetadataTypeDef = await client.delete_object(**kwargs) # (3)
- client: BackupStorageClient
- kwargs: DeleteObjectInputRequestTypeDef
- result: EmptyResponseMetadataTypeDef