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