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