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