{"id":3648,"library":"mypy-boto3-networkmanager","title":"Type Annotations for boto3 NetworkManager","description":"mypy-boto3-networkmanager provides type annotations for the `boto3` NetworkManager service. It is part of the `mypy-boto3` project, generated by `mypy-boto3-builder`, ensuring static type checking for the AWS SDK for Python (Boto3). It helps catch API usage errors at development time. The current version is 1.42.3 and new versions are frequently released to align with `boto3` updates and `mypy-boto3-builder` improvements.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["boto3","aws","mypy","types","networkmanager","static-analysis","type-hints"],"install":[{"cmd":"pip install mypy-boto3-networkmanager boto3","lang":"bash","label":"Install library and runtime dependency"}],"dependencies":[{"reason":"Provides the runtime functionality; `mypy-boto3-networkmanager` contains only type stubs.","package":"boto3","optional":false}],"imports":[{"symbol":"NetworkManagerClient","correct":"from mypy_boto3_networkmanager.client import NetworkManagerClient"},{"note":"Useful for stricter typing of client creation, e.g., boto3.client(service_name: ServiceName)","symbol":"ServiceName","correct":"from mypy_boto3_networkmanager.literals import ServiceName"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_networkmanager import NetworkManagerClient\n\ndef list_all_core_networks() -> None:\n    # Initialize the client with type hinting\n    client: NetworkManagerClient = boto3.client(\"networkmanager\")\n\n    print(\"Listing Core Networks...\")\n    try:\n        response = client.list_core_networks()\n        core_networks = response.get(\"CoreNetworks\", [])\n        if core_networks:\n            for cn in core_networks:\n                print(f\"  - {cn.get('CoreNetworkId')} ({cn.get('State')})\")\n        else:\n            print(\"  No Core Networks found.\")\n    except Exception as e:\n        print(f\"An error occurred: {e}\")\n\nif __name__ == \"__main__\":\n    list_all_core_networks()\n","lang":"python","description":"Demonstrates how to import and use the `NetworkManagerClient` type hint with a standard `boto3` client. This allows MyPy to validate method calls and arguments, ensuring type safety for your AWS interactions."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or higher, or pin `mypy-boto3-networkmanager` to an older version compatible with Python 3.8 if necessary.","message":"`mypy-boto3` packages (including `mypy-boto3-networkmanager`) no longer support Python 3.8 as of `mypy-boto3-builder` version 8.12.0. The minimum required Python version is now 3.9.","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.12.0"},{"fix":"Update your code to reflect the new `TypeDef` names. Consult the specific service's `type_defs.pyi` for the correct names if you're importing them directly.","message":"Type definition naming conventions changed in `mypy-boto3-builder` version 8.9.0. This primarily affects `TypeDef` names which may have become shorter (e.g., `RequestRequestTypeDef` to `RequestTypeDef`) or had postfixes moved (e.g., `ExtraRequestTypeDef` to `RequestExtraTypeDef`).","severity":"breaking","affected_versions":"mypy-boto3-builder >= 8.9.0"},{"fix":"Ensure `boto3` is included in your project's dependencies (e.g., `pip install boto3` or `requirements.txt`).","message":"This package provides only type stubs. `boto3` must be installed separately in your project for the code to run at runtime. `mypy-boto3-networkmanager` does not automatically install `boto3`.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Align your `mypy-boto3-networkmanager` version with your `boto3` version. `mypy-boto3` package versions are typically tied to the `boto3` version they provide stubs for (e.g., `mypy-boto3-networkmanager==1.42.3` for `boto3==1.42.3`).","message":"For optimal type checking, the version of `mypy-boto3-networkmanager` should closely match your installed `boto3` version. Mismatched versions can lead to incorrect type hints or missed type errors.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Ensure your `pip` version is up-to-date. If encountering issues with type checker discovery, verify the package installation method (e.g., `pip install --no-deps` or `pip install --no-build-isolation` if applicable in your CI/CD setup).","message":"Migration to PEP 561 packages in `mypy-boto3-builder` version 8.12.0 means packages are now installed in an editable mode by default if using modern pip. While this generally improves discovery, it might interact unexpectedly with specific build systems or older environments.","severity":"gotcha","affected_versions":"mypy-boto3-builder >= 8.12.0"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}