Skip to content

Examples#

Index > NetworkFlowMonitor > Examples

Auto-generated documentation for NetworkFlowMonitor type annotations stubs module mypy-boto3-networkflowmonitor.

Client#

Implicit type annotations#

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

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

# NetworkFlowMonitorClient usage example

from boto3.session import Session


session = Session()

client = session.client("networkflowmonitor")  # (1)
result = client.create_monitor()  # (2)
  1. client: NetworkFlowMonitorClient
  2. result: CreateMonitorOutputTypeDef
# GetQueryResultsMonitorTopContributorsPaginator usage example

from boto3.session import Session


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

paginator = client.get_paginator("get_query_results_monitor_top_contributors")  # (2)
for item in paginator.paginate(...):
    print(item)  # (3)
  1. client: NetworkFlowMonitorClient
  2. paginator: GetQueryResultsMonitorTopContributorsPaginator
  3. item: GetQueryResultsMonitorTopContributorsOutputTypeDef

Explicit type annotations#

With boto3-stubs-lite[networkflowmonitor] or a standalone mypy_boto3_networkflowmonitor package, you have to explicitly specify client: NetworkFlowMonitorClient 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.

# NetworkFlowMonitorClient usage example with type annotations

from boto3.session import Session

from