Type Annotations for Boto3 Chime SDK Meetings

1.42.3 · active · verified Sat Apr 11

mypy-boto3-chime-sdk-meetings provides comprehensive type annotations for the `boto3` Chime SDK Meetings service, ensuring type-safe AWS interactions for developers. It is generated by the `mypy-boto3-builder` project, which frequently releases updates to keep pace with `boto3` versions. The current version is 1.42.3, aligning with the `boto3` version it types.

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to use `mypy-boto3-chime-sdk-meetings` to get type hints for `boto3` calls related to Chime SDK Meetings. It initializes a client, creates a meeting, lists meetings, and then deletes the created meeting. The `if TYPE_CHECKING:` block ensures that the specific `mypy-boto3` imports are only processed by static type checkers, avoiding unnecessary runtime dependencies.

import os
from typing import TYPE_CHECKING

import boto3

# Ensure boto3 is installed: pip install boto3
# Ensure stubs are installed: pip install mypy-boto3-chime-sdk-meetings

if TYPE_CHECKING:
    from mypy_boto3_chime_sdk_meetings.client import ChimeSDKMeetingsClient
    from mypy_boto3_chime_sdk_meetings.type_defs import CreateMeetingResponseTypeDef

region = os.environ.get('AWS_REGION', 'us-east-1')

# The client variable gets type-hinted by mypy-boto3
client: 'ChimeSDKMeetingsClient' = boto3.client('chime-sdk-meetings', region_name=region)

try:
    # Example: Create a meeting
    meeting_id = 'my-unique-meeting-id'
    create_meeting_response: CreateMeetingResponseTypeDef = client.create_meeting(
        ClientRequestToken=meeting_id,
        MediaRegion='us-east-1',
        ExternalMeetingId='external-meeting-123'
    )
    print(f"Successfully created meeting: {create_meeting_response['Meeting']['MeetingId']}")

    # Example: List meetings (requires pagination for more results)
    list_meetings_response = client.list_meetings()
    print(f"Number of meetings: {len(list_meetings_response['Meetings'])}")

    # Example: Delete a meeting
    client.delete_meeting(MeetingId=create_meeting_response['Meeting']['MeetingId'])
    print(f"Successfully deleted meeting: {create_meeting_response['Meeting']['MeetingId']}")

except Exception as e:
    print(f"An error occurred: {e}")

view raw JSON →