Skip to content

Examples#

Index > Schemas > Examples

Auto-generated documentation for Schemas type annotations stubs module mypy-boto3-schemas.

Client#

Implicit type annotations#

Can be used with boto3-stubs[schemas] package installed.

Write your Schemas code as usual, type checking and code completion should work out of the box.

# SchemasClient usage example

from boto3.session import Session


session = Session()

client = session.client("schemas")  # (1)
result = client.create_discoverer()  # (2)
  1. client: SchemasClient
  2. result: CreateDiscovererResponseTypeDef
# ListDiscoverersPaginator usage example

from boto3.session import Session


session = Session()
client = session.client("schemas")  # (1)

paginator = client.get_paginator("list_discoverers")  # (2)
for item in paginator.paginate(...):
    print(item)  # (3)
  1. client: SchemasClient
  2. paginator: ListDiscoverersPaginator
  3. item: ListDiscoverersResponseTypeDef
# CodeBindingExistsWaiter usage example

from boto3.session import Session


session = Session()
client = session.client("schemas")  # (1)

waiter = client.get_waiter("code_binding_exists")  # (2)
waiter.wait()
  1. client: SchemasClient
  2. waiter: CodeBindingExistsWaiter

Explicit type annotations#

With boto3-stubs-lite[schemas] or a standalone mypy_boto3_schemas package, you have to explicitly specify client: SchemasClient 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