Examples#
Index > CodeStarconnections > Examples
Auto-generated documentation for CodeStarconnections type annotations stubs module types-boto3-codestar-connections.
Client#
Implicit type annotations#
Can be used with types-boto3[codestar-connections]
package installed.
Write your CodeStarconnections
code as usual,
type checking and code completion should work out of the box.
# CodeStarconnectionsClient usage example
from boto3.session import Session
session = Session()
client = session.client("codestar-connections") # (1)
result = client.create_connection() # (2)
- client: CodeStarconnectionsClient
- result: CreateConnectionOutputTypeDef
Explicit type annotations#
With types-boto3-lite[codestar-connections]
or a standalone types_boto3_codestar_connections
package, you have to explicitly specify client: CodeStarconnectionsClient
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.
# CodeStarconnectionsClient usage example with type annotations
from boto3.session import Session
from types_boto3_codestar_connections.client import CodeStarconnectionsClient
from types_boto3_codestar_connections.type_defs import CreateConnectionOutputTypeDef
from types_boto3_codestar_connections.type_defs import CreateConnectionInputRequestTypeDef
session = Session()
client: CodeStarconnectionsClient = session.client("codestar-connections")
kwargs: CreateConnectionInputRequestTypeDef = {...}
result: CreateConnectionOutputTypeDef = client.create_connection(**kwargs)