Registry / type-stubs / mypy-boto3-tnb

mypy-boto3-tnb

JSON →
library1.43.0pypypi✓ verified 23d ago

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.

pip install mypy-boto3-tnb boto3
INSTALL
IMPORT
SIG · MYPY-BOTO3-TNB
M
mypy-boto3-tnb
type-stubspythonv1.43.0
Install
3.8s avg
Import
571ms
Disk
50MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.43.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.592s · 52MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.8s · import 0.550s · 52MB
50MB installed
● package 50MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TelcoNetworkBuilderClient
from mypy_boto3_tnb.client import TelcoNetworkBuilderClient
Imports the typed client for the TelcoNetworkBuilder service.
CreateSolFunctionPackageInputRequestTypeDef
from mypy_boto3_tnb.type_defs import CreateSolFunctionPackageInputRequestTypeDef
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.
TnbClient
from mypy_boto3_tnb import TNBClient
from mypy_boto3_tnb.client import TnbClient
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.

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.

import boto3 from mypy_boto3_tnb.client import TelcoNetworkBuilderClient from mypy_boto3_tnb.type_defs import CreateSolFunctionPackageOutputTypeDef def create_tnb_function_package(package_name: str) -> CreateSolFunctionPackageOutputTypeDef: # mypy-boto3-tnb provides type hints, boto3 is the runtime client: TelcoNetworkBuilderClient = boto3.client("tnb") # Example API call with type hinting for input and output response: CreateSolFunctionPackageOutputTypeDef = client.create_sol_function_package( tags={ "Name": package_name } ) print(f"Successfully created SOL Function Package: {response.get('id')}") return response if __name__ == "__main__": # This code is for demonstration and requires AWS credentials configured # It will attempt to create a resource, which may incur costs. # Replace 'my-test-package' with a unique name. try: package_output = create_tnb_function_package("my-test-package") # Additional operations with package_output can be typed here except Exception as e: print(f"An error occurred: {e}")
Debug
Known issues
breakingPython 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.
fix
Upgrade your Python environment to 3.9 or higher.
affects: mypy-boto3-builder >=8.12.0 (and subsequently generated `mypy-boto3-*` packages)
breakingThe `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.
fix
Update your type checker (e.g., `pip install --upgrade mypy pyright`). Review your type checker configuration if issues persist.
affects: mypy-boto3-builder >=8.12.0 (and subsequently generated `mypy-boto3-*` packages)
breakingTypeDef 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.
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.
affects: mypy-boto3-builder >=8.9.0 (and subsequently generated `mypy-boto3-*` packages)
gotchaThis 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.
fix
Ensure `boto3` is installed alongside `mypy-boto3-tnb` in your project environment.
affects: All versions
gotchaFor 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.
fix
Add explicit type annotations to your `boto3.client()` and `boto3.resource()` calls, e.g., `client: TelcoNetworkBuilderClient = boto3.client("tnb")`.
affects: All versions
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredRuntime library for AWS SDK in Python; `mypy-boto3-tnb` provides type stubs for this library, not the implementation itself.
Agent activity
24 hits · last 30 days
node
22
OpenAI (training)
1
Resources
mypy-boto3-tnb — pip install mypy-boto3-tnb · libregistry