Examples#
Index > ElementalInference > Examples
Auto-generated documentation for ElementalInference type annotations stubs module mypy-boto3-elementalinference.
Client#
Implicit type annotations#
Can be used with boto3-stubs[elementalinference] package installed.
Write your ElementalInference code as usual,
type checking and code completion should work out of the box.
Client method usage example#
# ElementalInferenceClient usage example
from boto3.session import Session
session = Session()
client = session.client("elementalinference") # (1)
result = client.associate_feed() # (2)
- client: ElementalInferenceClient
- result: AssociateFeedResponseTypeDef
Paginator usage example#
# ListFeedsPaginator usage example
from boto3.session import Session
session = Session()
client = session.client("elementalinference") # (1)
paginator = client.get_paginator("list_feeds") # (2)
for item in paginator.paginate(...):
print(item) # (3)
- client: ElementalInferenceClient
- paginator: ListFeedsPaginator
- item: ListFeedsResponseTypeDef
Waiter usage example#
# FeedDeletedWaiter usage example
from boto3.session import Session
session = Session()
client = session.client("elementalinference") # (1)
waiter = client.get_waiter("feed_deleted") # (2)
waiter.wait(...)
- client: ElementalInferenceClient
- waiter: FeedDeletedWaiter
Explicit type annotations#
With boto3-stubs-lite[elementalinference]
or a standalone mypy_boto3_elementalinference package, you have to explicitly specify client: ElementalInferenceClient 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 method usage example#
# ElementalInferenceClient usage example with type annotations
from boto3.session import Session
from mypy_boto3_elementalinference.client import ElementalInferenceClient
from mypy_boto3_elementalinference.type_defs import AssociateFeedResponseTypeDef
from mypy_boto3_elementalinference.type_defs import AssociateFeedRequestTypeDef
session = Session()
client: ElementalInferenceClient = session.client("elementalinference")
kwargs: AssociateFeedRequestTypeDef = {...}
result: AssociateFeedResponseTypeDef = client.associate_feed(**kwargs)
Paginator usage example#
# ListFeedsPaginator usage example with type annotations
from boto3.session import Session
from mypy_boto3_elementalinference.client import ElementalInferenceClient
from mypy_boto3_elementalinference.paginator import ListFeedsPaginator
from mypy_boto3_elementalinference.type_defs import ListFeedsResponseTypeDef
session = Session()
client: ElementalInferenceClient = session.client("elementalinference")
paginator: ListFeedsPaginator = client.get_paginator("list_feeds")
for item in paginator.paginate(...):
item: ListFeedsResponseTypeDef
print(item)
Waiter usage example#
# FeedDeletedWaiter usage example with type annotations
from boto3.session import Session
from mypy_boto3_elementalinference.client import ElementalInferenceClient
from mypy_boto3_elementalinference.waiter import FeedDeletedWaiter
session = Session()
client: ElementalInferenceClient = session.client("elementalinference")
waiter: FeedDeletedWaiter = client.get_waiter("feed_deleted")
waiter.wait(...)