Examples#
Auto-generated documentation for Snowball type annotations stubs module types-boto3-snowball.
Client#
Implicit type annotations#
Can be used with types-boto3[snowball]
package installed.
Write your Snowball
code as usual,
type checking and code completion should work out of the box.
# SnowballClient usage example
from boto3.session import Session
session = Session()
client = session.client("snowball") # (1)
result = client.create_address() # (2)
- client: SnowballClient
- result: CreateAddressResultTypeDef
# DescribeAddressesPaginator usage example
from boto3.session import Session
session = Session()
client = session.client("snowball") # (1)
paginator = client.get_paginator("describe_addresses") # (2)
for item in paginator.paginate(...):
print(item) # (3)
- client: SnowballClient
- paginator: DescribeAddressesPaginator
- item: DescribeAddressesResultTypeDef
Explicit type annotations#
With types-boto3-lite[snowball]
or a standalone types_boto3_snowball
package, you have to explicitly specify client: SnowballClient
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.
# SnowballClient usage example with type annotations
from boto3.session import Session
from types_boto3_snowball.client import SnowballClient
from types_boto3_snowball.type_defs import CreateAddressResultTypeDef
from types_boto3_snowball.type_defs import CreateAddressRequestRequestTypeDef
session = Session()
client: SnowballClient = session.client("snowball")
kwargs: CreateAddressRequestRequestTypeDef = {...}
result: CreateAddressResultTypeDef = client.create_address(**kwargs)
# DescribeAddressesPaginator usage example with type annotations
from boto3.session import Session
from types_boto3_snowball.client import SnowballClient
from types_boto3_snowball.paginator import DescribeAddressesPaginator
from types_boto3_snowball.type_defs import DescribeAddressesResultTypeDef
session = Session()
client: SnowballClient = session.client("snowball")
paginator: DescribeAddressesPaginator = client.get_paginator("describe_addresses")
for item in paginator.paginate(...):
item: DescribeAddressesResultTypeDef
print(item)