Examples
Auto-generated documentation for Mobile type annotations stubs module types-aiobotocore-mobile.
Client
Implicit type annotations
Can be used with types-aioboto3[mobile]
package installed.
Write your Mobile
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("mobile") as client: # (1)
result = await client.create_project() # (2)
- client: MobileClient
- result: CreateProjectResultTypeDef
Paginator usage example
from aioboto3.session import Session
session = Session()
async with session.client("mobile") as client: # (1)
paginator = client.get_paginator("list_bundles") # (2)
async for item in paginator.paginate(...):
print(item) # (3)
- client: MobileClient
- paginator: ListBundlesPaginator
- item: ListBundlesResultTypeDef
Explicit type annotations
With types-aioboto3-lite[mobile]
or a standalone types_aiobotocore_mobile
package, you have to explicitly specify
client: MobileClient
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_mobile.client import MobileClient
from types_aiobotocore_mobile.type_defs import CreateProjectResultTypeDef
from types_aiobotocore_mobile.type_defs import CreateProjectRequestRequestTypeDef
session = Session()
client: MobileClient
async with session.client("mobile") as client: # (1)
kwargs: CreateProjectRequestRequestTypeDef = {...} # (2)
result: CreateProjectResultTypeDef = await client.create_project(**kwargs) # (3)
- client: MobileClient
- kwargs: CreateProjectRequestRequestTypeDef
- result: CreateProjectResultTypeDef
Paginator usage example
from aioboto3.session import Session
from types_aiobotocore_mobile.client import MobileClient
from types_aiobotocore_mobile.paginator import ListBundlesPaginator
from types_aiobotocore_mobile.type_defs import ListBundlesResultTypeDef
session = Session()
client: MobileClient
async with session.client("mobile") as client: # (1)
paginator: ListBundlesPaginator = client.get_paginator("list_bundles") # (2)
async for item in paginator.paginate(...):
item: ListBundlesResultTypeDef
print(item) # (3)
- client: MobileClient
- paginator: ListBundlesPaginator
- item: ListBundlesResultTypeDef