Skip to content

Examples

Index > ManagedBlockchain > Examples

Auto-generated documentation for ManagedBlockchain type annotations stubs module types-aiobotocore-managedblockchain.

Client

Implicit type annotations

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

Write your ManagedBlockchain 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("managedblockchain") as client:  # (1)
    result = await client.create_member()  # (2)
  1. client: ManagedBlockchainClient
  2. result: CreateMemberOutputTypeDef

Explicit type annotations

With types-aioboto3-lite[managedblockchain] or a standalone types_aiobotocore_managedblockchain package, you have to explicitly specify client: ManagedBlockchainClient 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_managedblockchain.client import ManagedBlockchainClient
from types_aiobotocore_managedblockchain.type_defs import CreateMemberOutputTypeDef
from types_aiobotocore_managedblockchain.type_defs import CreateMemberInputRequestTypeDef


session = Session()

client: ManagedBlockchainClient
async with session.client("managedblockchain") as client:  # (1)
    kwargs: CreateMemberInputRequestTypeDef = {...}  # (2)
    result: CreateMemberOutputTypeDef = await client.create_member(**kwargs)  # (3)
  1. client: ManagedBlockchainClient
  2. kwargs: CreateMemberInputRequestTypeDef
  3. result: CreateMemberOutputTypeDef