Examples
Index > LicenseManager > Examples
Auto-generated documentation for LicenseManager type annotations stubs module types-aiobotocore-license-manager.
Client
Implicit type annotations
Can be used with types-aioboto3[license-manager]
package installed.
Write your LicenseManager
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("license-manager") as client: # (1)
result = await client.accept_grant() # (2)
- client: LicenseManagerClient
- result: AcceptGrantResponseTypeDef
Explicit type annotations
With types-aioboto3-lite[license-manager]
or a standalone types_aiobotocore_license_manager
package, you have to explicitly specify
client: LicenseManagerClient
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_license_manager.client import LicenseManagerClient
from types_aiobotocore_license_manager.type_defs import AcceptGrantResponseTypeDef
from types_aiobotocore_license_manager.type_defs import AcceptGrantRequestRequestTypeDef
session = Session()
client: LicenseManagerClient
async with session.client("license-manager") as client: # (1)
kwargs: AcceptGrantRequestRequestTypeDef = {...} # (2)
result: AcceptGrantResponseTypeDef = await client.accept_grant(**kwargs) # (3)
- client: LicenseManagerClient
- kwargs: AcceptGrantRequestRequestTypeDef
- result: AcceptGrantResponseTypeDef
Paginator usage example
from aioboto3.session import Session
from types_aiobotocore_license_manager.client import LicenseManagerClient
from types_aiobotocore_license_manager.paginator import ListAssociationsForLicenseConfigurationPaginator
from types_aiobotocore_license_manager.type_defs import ListAssociationsForLicenseConfigurationResponseTypeDef
session = Session()
client: LicenseManagerClient
async with session.client("license-manager") as client: # (1)
paginator: ListAssociationsForLicenseConfigurationPaginator = client.get_paginator("list_associations_for_license_configuration") # (2)
async for item in paginator.paginate(...):
item: ListAssociationsForLicenseConfigurationResponseTypeDef
print(item) # (3)