Registry / type-stubs / mypy-boto3-mpa

mypy-boto3-mpa

JSON →
library1.43.0pypypi✓ verified 22d ago

mypy-boto3-mpa provides precise type annotations for the boto3 Multiparty Approval (MPA) service, generated by the `mypy-boto3-builder`. It helps improve code quality and catch type-related errors at development time when working with the AWS MPA API using boto3. The current version is 1.42.62, and releases are frequent, typically in sync with new boto3/botocore releases and AWS service updates.

pip install mypy-boto3-mpa boto3 mypy
INSTALL
IMPORT
SIG · MYPY-BOTO3-MPA
M
mypy-boto3-mpa
type-stubspythonv1.43.0
Install
5.8s avg
Import
Disk
114MB
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.000s · 116.6MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 5.8s · import 0.000s · 114MB
114MB installed
● package 114MB
Code
Verified usage

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

MPAClient
from mypy_boto3_mpa.client import MPAClient
from mypy_boto3_mpa import MPAClient
Client types are typically located within the `.client` submodule of the stub package.
MPATypeDef
from mypy_boto3_mpa.type_defs import ApprovalRuleSummaryTypeDef
Specific TypeDef classes are found in the `.type_defs` submodule.

This example demonstrates how to obtain a type-hinted MPA client using `boto3.client` and import a specific TypeDef. `mypy` will then use the installed `mypy-boto3-mpa` stubs to provide static type checking for your boto3 calls. Note that `list_approval_rules` is a placeholder operation, and you'd replace it with an actual MPA API call in a functional application.

import boto3 from mypy_boto3_mpa.client import MPAClient from mypy_boto3_mpa.type_defs import ListApprovalRulesOutputTypeDef def get_mpa_rules() -> ListApprovalRulesOutputTypeDef: # mypy-boto3-mpa provides type hints for the boto3 client client: MPAClient = boto3.client("mpa") # Replace with an actual operation that returns a list of rules # For a real scenario, you'd call a valid MPA API operation. response: ListApprovalRulesOutputTypeDef = client.list_approval_rules() # type: ignore print(f"Found {len(response.get('ApprovalRules', []))} approval rules.") return response if __name__ == '__main__': # This example requires boto3 and mypy-boto3-mpa to be installed. # The 'type: ignore' comment is used because 'list_approval_rules' # is a placeholder and might not exist or require specific parameters. # In a real application, you would use actual MPA service methods. try: get_mpa_rules() except Exception as e: print(f"Could not fetch MPA rules (this is expected if the service method is a placeholder or not configured): {e}")
Debug
Known issues
breakingSupport for Python 3.8 has been removed in `mypy-boto3-builder` version 8.12.0 and later, which affects all generated stub packages including `mypy-boto3-mpa`. Ensure your project uses Python 3.9 or newer.
fix
Upgrade your Python environment to version 3.9 or higher.
affects: >=8.12.0 (builder), >=1.42.0 (stubs)
breakingThe `mypy-boto3` ecosystem migrated to PEP 561 compliant packages in version 8.12.0. While this improves discoverability for `mypy`, it might require updates to build systems or older `mypy` versions that relied on previous stub package structures. This also means packages are now `py.typed`.
fix
Ensure your `mypy` version is up-to-date and your build system correctly recognizes PEP 561 packages. No direct code changes are typically required unless you were manipulating stub paths directly.
affects: >=8.12.0 (builder), >=1.42.0 (stubs)
breakingIn builder version 8.9.0, there were breaking changes to how TypeDefs for packed method arguments and conflicting names were generated. TypeDefs now use shorter names (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`) and conflicting `Extra` postfixes are moved to the end.
fix
Review and update any custom TypeDef imports or direct references to TypeDef names if they were affected by these naming conventions. Use auto-completion in your IDE to find the correct new names.
affects: >=8.9.0 (builder), >=1.39.0 (stubs)
gotcha`mypy-boto3-mpa` is a type stub package; it does not provide runtime functionality. It should not be imported as a regular library to instantiate clients or resources. Its purpose is solely for static type checking with tools like `mypy`.
fix
Always import `boto3` for runtime interactions. `mypy-boto3-mpa` should only be installed in your development environment for type checking purposes.
affects: All
gotchaFor optimal type checking, ensure that the version of `mypy-boto3-mpa` (and other `mypy-boto3-*` stubs) generally aligns with the version of `boto3` you are using. While minor mismatches often work, significant version differences can lead to incorrect type hints or missing definitions.
fix
Regularly update `mypy-boto3-mpa` along with your `boto3` library. The `mypy-boto3-builder` typically generates stubs based on the latest botocore/boto3 versions.
affects: All
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredRuntime library for interacting with AWS services. These stubs provide type hints for boto3.
mypyoptionalThe primary static type checker that utilizes these stubs.
Agent activity
16 hits · last 30 days
node
12
OpenAI (training)
1
Resources