Registry / type-stubs / mypy-boto3-b2bi

mypy-boto3-b2bi

JSON →
library1.43.0pypypi✓ verified 23d ago

mypy-boto3-b2bi provides comprehensive type annotations for the AWS B2BI service client in `boto3`. It's part of the `mypy-boto3` collection, which generates type stubs for all `boto3` services, enhancing developer experience with static analysis and auto-completion. The current version is 1.42.3, and new versions are released frequently, typically mirroring `boto3` updates and `mypy-boto3-builder` releases.

pip install boto3 mypy-boto3-b2bi
INSTALL
IMPORT
SIG · MYPY-BOTO3-B2BI
M
mypy-boto3-b2bi
type-stubspythonv1.43.0
Install
3.7s avg
Import
597ms
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.628s · 52MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.7s · import 0.566s · 53MB
50MB installed
● package 50MB
Code
Verified usage

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

B2BIClient
from mypy_boto3_b2bi.client import B2BIClient
from boto3.client import B2BIClient
The type stubs are provided by `mypy_boto3_b2bi`, not directly by `boto3`'s runtime components. Explicitly importing the `B2BIClient` type from the stub package enables static type checking.
paginate
from mypy_boto3_b2bi.paginator import ListPartnershipsPaginator
Accessing paginator types for specific operations.
waiter
from mypy_boto3_b2bi.waiter import SomeResourceExistsWaiter
Accessing waiter types for specific operations. (Note: B2BI may not have waiters)

This quickstart demonstrates how to instantiate a B2BI client from `boto3` and apply the `mypy-boto3-b2bi` type annotations. It performs a simple `list_partnerships` operation, showcasing how static analysis can infer types for client methods and response structures.

import boto3 from mypy_boto3_b2bi import B2BIClient from typing import Dict, Any # The actual client comes from boto3. The B2BIClient type from mypy_boto3_b2bi # is used to provide type hints for static analysis. try: # Assuming AWS credentials are configured (e.g., via environment variables or ~/.aws/credentials) client: B2BIClient = boto3.client("b2bi") # Example operation: List Partnerships # mypy will now validate the parameters and the structure of the response. response = client.list_partnerships( MaxResults=5 # Optional: limit the number of results ) partnerships = response.get('partnerships', []) print(f"Found {len(partnerships)} B2BI partnerships.") for partnership in partnerships: print(f" - Partnership ID: {partnership.get('partnershipId')}, Name: {partnership.get('name')}") except Exception as e: print(f"An error occurred: {e}") print("Ensure 'boto3' and 'mypy-boto3-b2bi' are installed and AWS credentials are configured.")
Debug
Known issues
breakingThe `mypy-boto3-builder` (version 8.12.0, which generated mypy-boto3-b2bi 1.42.3) removed support for Python 3.8 and migrated to PEP 561 package standards. Projects still on Python 3.8 or relying on older package structures will encounter import or runtime errors.
fix
Upgrade your project's Python version to 3.9 or newer. Ensure your package manager (e.g., pip) is up-to-date to correctly handle PEP 561 packages.
affects: mypy-boto3-builder >= 8.12.0 (and generated stubs like mypy-boto3-b2bi >= 1.42.x)
gotcha`mypy-boto3-b2bi` provides only type stubs. For the code to run, the actual `boto3` library must be installed. The stubs themselves do not include the AWS SDK functionality.
fix
Always install `boto3` alongside `mypy-boto3-b2bi` using `pip install boto3 mypy-boto3-b2bi`.
affects: All versions
gotchaSignificant version mismatches between `boto3` and `mypy-boto3-b2bi` can lead to incorrect or missing type hints, as the stubs are generated to match specific `boto3` service definitions.
fix
Aim to keep `boto3` and `mypy-boto3-b2bi` versions as closely aligned as possible. Ideally, update them simultaneously or choose `mypy-boto3-b2bi` versions that explicitly state compatibility with your `boto3` version.
affects: All versions
breakingThe `mypy-boto3-builder` (from version 8.9.0) introduced changes to generated TypeDef naming conventions (e.g., shorter names, altered postfix placement). While specific examples may not be for B2BI, direct reliance on exact TypeDef names from previous versions may break after an upgrade.
fix
After updating, review any code that directly references generated TypeDef classes (e.g., for custom validation or mock objects) and adjust to the new naming conventions.
affects: mypy-boto3-builder >= 8.9.0 and subsequently generated stubs.
deprecatedSpecific AWS services may be renamed or deprecated, leading to their corresponding `mypy-boto3-*` stub packages being updated or removed (e.g., `sms-voice` replaced by `pinpoint-sms-voice` in builder v8.11.0). While not directly impacting B2BI currently, this indicates a general risk for other services.
fix
Consult `mypy-boto3-builder` release notes and AWS documentation when upgrading or if type errors appear unexpectedly for specific services.
affects: All versions, depending on AWS service updates.
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3optionalProvides the underlying AWS SDK client that these type stubs annotate. `boto3` must be installed and kept updated to match the stub versions for accurate type checking.
Agent activity
25 hits · last 30 days
node
22
OpenAI (training)
1
Resources
mypy-boto3-b2bi — pip install mypy-boto3-b2bi · libregistry