mypy-boto3-wickr Type Stubs for WickrAdminAPI

1.42.55 · active · verified Sat Apr 11

mypy-boto3-wickr provides type annotations for the boto3 WickrAdminAPI service, allowing static type checking with tools like MyPy. It is part of the `mypy-boto3` family, generated with `mypy-boto3-builder`, and currently at version 1.42.55. The `mypy-boto3` project generally releases updates in sync with new boto3 and AWS service releases.

Warnings

Install

Imports

Quickstart

This example demonstrates how to instantiate a `boto3` WickrAdmin client and use the `mypy-boto3-wickr` stubs for static type checking. The `TYPE_CHECKING` block ensures that the type hints are only used by type checkers like MyPy and do not affect runtime behavior. You need to run `mypy your_script.py` to see the benefits.

import boto3
from mypy_boto3_wickr.client import WickrAdminClient
from typing import TYPE_CHECKING

# Instantiate a boto3 client (runtime code)
wickr_client = boto3.client("wickr")

# Use TYPE_CHECKING block for type hints, not runtime execution
if TYPE_CHECKING:
    # This allows mypy to confirm the client type
    reveal_type(wickr_client)  # Expected: 'WickrAdminClient'
    typed_wickr_client: WickrAdminClient = wickr_client
    # Now, typed_wickr_client has full type hints for methods and arguments
    response = typed_wickr_client.list_memberships() 
else:
    # In runtime, wickr_client is just the boto3 client
    response = wickr_client.list_memberships()

print("ListMemberships response keys:", response.keys())

view raw JSON →