Examples
Index > ServiceCatalog > Examples
Auto-generated documentation for ServiceCatalog type annotations stubs module types-aiobotocore-servicecatalog.
Client
Implicit type annotations
Can be used with types-aioboto3[servicecatalog]
package installed.
Write your ServiceCatalog
code as usual,
type checking and code completion should work out of the box.
Paginator usage example
from aioboto3.session import Session
session = Session()
async with session.client("servicecatalog") as client: # (1)
paginator = client.get_paginator("list_accepted_portfolio_shares") # (2)
async for item in paginator.paginate(...):
print(item) # (3)
- client: ServiceCatalogClient
- paginator: ListAcceptedPortfolioSharesPaginator
- item: ListAcceptedPortfolioSharesOutputTypeDef
Explicit type annotations
With types-aioboto3-lite[servicecatalog]
or a standalone types_aiobotocore_servicecatalog
package, you have to explicitly specify
client: ServiceCatalogClient
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_servicecatalog.client import ServiceCatalogClient
from types_aiobotocore_servicecatalog.type_defs import BatchAssociateServiceActionWithProvisioningArtifactOutputTypeDef
from types_aiobotocore_servicecatalog.type_defs import BatchAssociateServiceActionWithProvisioningArtifactInputRequestTypeDef
session = Session()
client: ServiceCatalogClient
async with session.client("servicecatalog") as client: # (1)
kwargs: BatchAssociateServiceActionWithProvisioningArtifactInputRequestTypeDef = {...} # (2)
result: BatchAssociateServiceActionWithProvisioningArtifactOutputTypeDef = await client.batch_associate_service_action_with_provisioning_artifact(**kwargs) # (3)
Paginator usage example
from aioboto3.session import Session
from types_aiobotocore_servicecatalog.client import ServiceCatalogClient
from types_aiobotocore_servicecatalog.paginator import ListAcceptedPortfolioSharesPaginator
from types_aiobotocore_servicecatalog.type_defs import ListAcceptedPortfolioSharesOutputTypeDef
session = Session()
client: ServiceCatalogClient
async with session.client("servicecatalog") as client: # (1)
paginator: ListAcceptedPortfolioSharesPaginator = client.get_paginator("list_accepted_portfolio_shares") # (2)
async for item in paginator.paginate(...):
item: ListAcceptedPortfolioSharesOutputTypeDef
print(item) # (3)
- client: ServiceCatalogClient
- paginator: ListAcceptedPortfolioSharesPaginator
- item: ListAcceptedPortfolioSharesOutputTypeDef