Examples#
Auto-generated documentation for Private5G type annotations stubs module types-aiobotocore-privatenetworks.
Client#
Implicit type annotations#
Can be used with types-aiobotocore[privatenetworks]
package installed.
Write your Private5G
code as usual,
type checking and code completion should work out of the box.
# Private5GClient usage example
from aiobotocore.session import get_session
session = get_session()
async with session.create_client("privatenetworks") as client: # (1)
result = await client.acknowledge_order_receipt() # (2)
- client: Private5GClient
- result: AcknowledgeOrderReceiptResponseTypeDef
# ListDeviceIdentifiersPaginator usage example
from aiobotocore.session import get_session
session = get_session()
async with session.create_client("privatenetworks") as client: # (1)
paginator = client.get_paginator("list_device_identifiers") # (2)
async for item in paginator.paginate(...):
print(item) # (3)
- client: Private5GClient
- paginator: ListDeviceIdentifiersPaginator
- item: ListDeviceIdentifiersResponseTypeDef
Explicit type annotations#
With types-aiobotocore-lite[privatenetworks]
or a standalone types_aiobotocore_privatenetworks
package, you have to explicitly specify
client: Private5GClient
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.
# Private5GClient usage example with type annotations
from aiobotocore.session import get_session
from types_aiobotocore_privatenetworks.client import Private5GClient
from types_aiobotocore_privatenetworks.type_defs import AcknowledgeOrderReceiptResponseTypeDef
from types_aiobotocore_privatenetworks.type_defs import AcknowledgeOrderReceiptRequestRequestTypeDef
session = get_session()
async with session.create_client("privatenetworks") as client:
client: Private5GClient
kwargs: AcknowledgeOrderReceiptRequestRequestTypeDef = {...}
result: AcknowledgeOrderReceiptResponseTypeDef = await client.acknowledge_order_receipt(**kwargs)
# ListDeviceIdentifiersPaginator usage example with type annotations
from aiobotocore.session import get_session
from types_aiobotocore_privatenetworks.client import Private5GClient
from types_aiobotocore_privatenetworks.paginator import ListDeviceIdentifiersPaginator
from types_aiobotocore_privatenetworks.type_defs import ListDeviceIdentifiersResponseTypeDef
session = get_session()
async with session.create_client("privatenetworks") as client:
client: Private5GClient
paginator: ListDeviceIdentifiersPaginator = client.get_paginator("list_device_identifiers")
async for item in paginator.paginate(...):
item: ListDeviceIdentifiersResponseTypeDef
print(item)