Examples
Auto-generated documentation for Outposts type annotations stubs module types-aiobotocore-outposts.
Client
Implicit type annotations
Can be used with types-aioboto3[outposts]
package installed.
Write your Outposts
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("outposts") as client: # (1)
result = await client.create_order() # (2)
- client: OutpostsClient
- result: CreateOrderOutputTypeDef
Explicit type annotations
With types-aioboto3-lite[outposts]
or a standalone types_aiobotocore_outposts
package, you have to explicitly specify
client: OutpostsClient
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_outposts.client import OutpostsClient
from types_aiobotocore_outposts.type_defs import CreateOrderOutputTypeDef
from types_aiobotocore_outposts.type_defs import CreateOrderInputRequestTypeDef
session = Session()
client: OutpostsClient
async with session.client("outposts") as client: # (1)
kwargs: CreateOrderInputRequestTypeDef = {...} # (2)
result: CreateOrderOutputTypeDef = await client.create_order(**kwargs) # (3)
- client: OutpostsClient
- kwargs: CreateOrderInputRequestTypeDef
- result: CreateOrderOutputTypeDef