Skip to content

Examples

Index > ConnectParticipant > Examples

Auto-generated documentation for ConnectParticipant type annotations stubs module types-aiobotocore-connectparticipant.

Client

Implicit type annotations

Can be used with types-aioboto3[connectparticipant] package installed.

Write your ConnectParticipant 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("connectparticipant") as client:  # (1)
    result = await client.create_participant_connection()  # (2)
  1. client: ConnectParticipantClient
  2. result: CreateParticipantConnectionResponseTypeDef

Explicit type annotations

With types-aioboto3-lite[connectparticipant] or a standalone types_aiobotocore_connectparticipant package, you have to explicitly specify client: ConnectParticipantClient 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_connectparticipant.client import ConnectParticipantClient
from types_aiobotocore_connectparticipant.type_defs import CreateParticipantConnectionResponseTypeDef
from types_aiobotocore_connectparticipant.type_defs import CreateParticipantConnectionRequestRequestTypeDef


session = Session()

client: ConnectParticipantClient
async with session.client("connectparticipant") as client:  # (1)
    kwargs: CreateParticipantConnectionRequestRequestTypeDef = {...}  # (2)
    result: CreateParticipantConnectionResponseTypeDef = await client.create_participant_connection(**kwargs)  # (3)
  1. client: ConnectParticipantClient
  2. kwargs: CreateParticipantConnectionRequestRequestTypeDef
  3. result: CreateParticipantConnectionResponseTypeDef