{"id":3157,"library":"mypy-boto3-tnb","title":"mypy-boto3-tnb","description":"mypy-boto3-tnb provides type annotations for the `boto3` TelcoNetworkBuilder (TNB) service. It is part of the `mypy-boto3` ecosystem, generated by `mypy-boto3-builder`, offering enhanced type checking and IDE auto-completion for `boto3` clients and related objects. The `mypy-boto3` project maintains a frequent release cadence, typically releasing updates monthly or bi-monthly to keep pace with `boto3` and `botocore` changes.","status":"active","version":"1.42.3","language":"python","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["aws","boto3","mypy","types","type-hints","telconetworkbuilder","tnb","stub"],"install":[{"cmd":"pip install mypy-boto3-tnb boto3","lang":"bash","label":"Install with boto3 runtime"}],"dependencies":[{"reason":"Runtime library for AWS SDK in Python; `mypy-boto3-tnb` provides type stubs for this library, not the implementation itself.","package":"boto3","optional":false}],"imports":[{"note":"Imports the typed client for the TelcoNetworkBuilder service.","symbol":"TelcoNetworkBuilderClient","correct":"from mypy_boto3_tnb.client import TelcoNetworkBuilderClient"},{"note":"Imports a sample TypeDef for input parameters, common for explicit type hinting of request/response objects. Specific TypeDef names should be looked up in the library's documentation or IDE autocomplete.","symbol":"CreateSolFunctionPackageInputRequestTypeDef","correct":"from mypy_boto3_tnb.type_defs import CreateSolFunctionPackageInputRequestTypeDef"},{"note":"The primary client class is named `TelcoNetworkBuilderClient` or `TNBClient` depending on context and specific generated version, not `TnbClient`. Always refer to documentation or IDE for exact generated name.","wrong":"from mypy_boto3_tnb.client import TnbClient","symbol":"TnbClient","correct":"from mypy_boto3_tnb import TNBClient"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_tnb.client import TelcoNetworkBuilderClient\nfrom mypy_boto3_tnb.type_defs import CreateSolFunctionPackageOutputTypeDef\n\ndef create_tnb_function_package(package_name: str) -> CreateSolFunctionPackageOutputTypeDef:\n    # mypy-boto3-tnb provides type hints, boto3 is the runtime\n    client: TelcoNetworkBuilderClient = boto3.client(\"tnb\")\n\n    # Example API call with type hinting for input and output\n    response: CreateSolFunctionPackageOutputTypeDef = client.create_sol_function_package(\n        tags={\n            \"Name\": package_name\n        }\n    )\n    print(f\"Successfully created SOL Function Package: {response.get('id')}\")\n    return response\n\nif __name__ == \"__main__\":\n    # This code is for demonstration and requires AWS credentials configured\n    # It will attempt to create a resource, which may incur costs.\n    # Replace 'my-test-package' with a unique name.\n    try:\n        package_output = create_tnb_function_package(\"my-test-package\")\n        # Additional operations with package_output can be typed here\n    except Exception as e:\n        print(f\"An error occurred: {e}\")","lang":"python","description":"This quickstart demonstrates how to use `mypy-boto3-tnb` to add type hints for the TelcoNetworkBuilder service client. It shows the explicit import of the typed client and a `TypeDef` for return values, enhancing code completion and type checking for `boto3` operations. Remember to have AWS credentials configured for the `boto3.client` call to succeed."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or higher.","message":"Python 3.8 support was removed with `mypy-boto3-builder` version 8.12.0. Users on Python 3.8 will need to upgrade to Python 3.9 or newer to use newly generated stubs.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.12.0 (and subsequently generated `mypy-boto3-*` packages)"},{"fix":"Update your type checker (e.g., `pip install --upgrade mypy pyright`). Review your type checker configuration if issues persist.","message":"The `mypy-boto3` ecosystem migrated to PEP 561 compliant packages with `mypy-boto3-builder` 8.12.0. While this generally improves type checker compatibility, ensure your type checker (e.g., MyPy, Pyright) is up-to-date to properly discover the new package structure.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.12.0 (and subsequently generated `mypy-boto3-*` packages)"},{"fix":"Update your `TypeDef` import paths and names in your code to match the new conventions. Use IDE autocomplete or generated documentation to find the correct names.","message":"TypeDef naming conventions changed in `mypy-boto3-builder` 8.9.0. Some `TypeDef` names were shortened (e.g., `CreateDistributionRequestRequestTypeDef` became `CreateDistributionRequestTypeDef`) or had postfixes moved, which can break explicit `TypeDef` imports.","severity":"breaking","affected_versions":"mypy-boto3-builder >=8.9.0 (and subsequently generated `mypy-boto3-*` packages)"},{"fix":"Ensure `boto3` is installed alongside `mypy-boto3-tnb` in your project environment.","message":"This library provides *only* type annotations. You must still install the `boto3` runtime library (e.g., `pip install boto3`) for your code to function at runtime.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Add explicit type annotations to your `boto3.client()` and `boto3.resource()` calls, e.g., `client: TelcoNetworkBuilderClient = boto3.client(\"tnb\")`.","message":"For optimal type checking, especially with standalone stub packages like `mypy-boto3-tnb`, it is recommended to explicitly annotate `boto3.client()` and `boto3.resource()` calls with the imported client types. While some IDEs might infer types, explicit annotations ensure consistent and reliable type checking across tools.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"search_vec":"'annot':11 'auto':40 'auto-complet':39 'aw':74 'bi':64 'bi-month':63 'boto3':3,7,14,25,31,43,51,70,75 'botocor':72 'builder':32 'cadenc':57 'chang':73 'check':36 'client':44 'complet':41 'ecosystem':26 'enhanc':34 'frequent':55 'generat':27 'hint':80 'ide':38 'keep':67 'maintain':53 'month':61,65 'mypi':2,6,24,30,50,76 'mypy-boto3':23,49 'mypy-boto3-builder':29 'mypy-boto3-tnb':1,5 'object':47 'offer':33 'pace':68 'part':20 'project':52 'provid':9 'relat':46 'releas':56,59 'servic':17 'stub':83 'telconetworkbuild':15,81 'tnb':4,8,16,82 'type':10,35,77,79 'type-hint':78 'typic':58 'updat':60","created_at":"2026-04-11T09:23:28.798151+00:00","updated_at":"2026-04-16T17:16:14.282446+00:00","problems":{"verify_error":"error: Failed to parse: `mypy-boto3-tnb boto3`\n  Caused by: Expected one of `@`, `(`, `<`, `=`, `>`, `~`, `!`, `;`, found `b`\nmypy-boto3-tnb boto3\n               ^"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.43.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/youtype/mypy_boto3_builder","docs":"https://youtype.github.io/boto3_stubs_docs/mypy_boto3_tnb/","changelog":null,"pypi":"https://pypi.org/project/mypy-boto3-tnb/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["type-stubs","aws"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-08-28","next_check":"2026-07-05","install_tag":null}}