Registry / type-stubs / mypy-boto3-mediapackagev2

mypy-boto3-mediapackagev2

JSON →
library1.43.67pypypi✓ verified 22d ago

mypy-boto3-mediapackagev2 provides type annotations for the AWS boto3 MediapackageV2 service, generated by the mypy-boto3-builder tool. It allows static type checkers like Mypy, Pyright, and IDEs to provide auto-completion and error detection for boto3 MediapackageV2 client interactions. The library is actively maintained, with frequent updates tied to `mypy-boto3-builder` releases, ensuring compatibility with the latest boto3 versions.

pip install boto3 mypy-boto3-mediapackagev2
INSTALL
IMPORT
SIG · MYPY-BOTO3-MEDIAPA
M
mypy-boto3-mediapackagev2
type-stubspythonv1.43.67
Install
3.8s avg
Import
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.67 · 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 · 52MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 3.8s · import 0.000s · 53MB
50MB installed
● package 50MB
Code
Verified usage

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

MediaPackageV2Client
from mypy_boto3_mediapackagev2.client import MediaPackageV2Client
Import the specific client type for explicit type hints.
CreateChannelRequestTypeDef
from mypy_boto3_mediapackagev2.type_defs import CreateChannelRequestTypeDef
Import TypeDef classes for precise type hints on service call arguments and responses. Specific TypeDefs will vary per operation.

This quickstart demonstrates how to initialize a `mediapackagev2` client with explicit type annotations and use a typed `TypeDef` for input parameters, which enables static analysis for method calls like `create_channel`. Replace placeholder AWS credentials and ensure your AWS environment is configured for actual execution. The `TYPE_CHECKING` block ensures type imports are only active during type checking, avoiding runtime import issues for stub-only packages.

import boto3 import os from typing import TYPE_CHECKING if TYPE_CHECKING: from mypy_boto3_mediapackagev2.client import MediaPackageV2Client from mypy_boto3_mediapackagev2.type_defs import CreateChannelRequestTypeDef, ChannelTypeDef # Ensure AWS credentials are configured (e.g., via environment variables or ~/.aws/credentials) # For quickstart, using dummy values for illustrative purposes aws_access_key_id = os.environ.get('AWS_ACCESS_KEY_ID', 'AKIAIOSFODNN7EXAMPLE') aws_secret_access_key = os.environ.get('AWS_SECRET_ACCESS_KEY', 'wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY') aws_region = os.environ.get('AWS_REGION', 'us-east-1') def create_test_channel(channel_id: str, channel_group_id: str) -> 'ChannelTypeDef': client: MediaPackageV2Client = boto3.client( 'mediapackagev2', aws_access_key_id=aws_access_key_id, aws_secret_access_key=aws_secret_access_key, region_name=aws_region ) channel_config: CreateChannelRequestTypeDef = { 'ChannelName': channel_id, 'ChannelGroupName': channel_group_id, 'InputType': 'CMAF', 'Tags': {'Environment': 'dev', 'Project': 'quickstart'} } response = client.create_channel(**channel_config) print(f"Channel '{response['ChannelName']}' created with ARN: {response['Arn']}") return response if __name__ == '__main__': # This part would typically be mocked or run against a dev AWS account # to avoid actual resource creation/cost. try: # Example: Attempt to create a channel (this will likely fail without real creds/perms) # and without a pre-existing Channel Group. print("Attempting to create a MediaPackageV2 channel...") created_channel = create_test_channel("my-test-channel-123", "my-test-channel-group") # In a real scenario, you'd process 'created_channel' further. except Exception as e: print(f"An error occurred (expected without valid AWS setup): {e}") print("Please ensure 'boto3' is installed and AWS credentials/permissions are correctly configured.")
Debug
Known issues
breakingPython 3.8 support has been removed in `mypy-boto3-builder` version 8.12.0 and subsequent generated packages. This library now requires Python 3.9 or newer.
fix
Upgrade your Python environment to 3.9 or higher.
affects: >=8.12.0 (for builder) and dependent stub packages
breakingThe `mypy-boto3-builder` migrated to PEP 561 compliant packages with version 8.12.0. While this improves discoverability for type checkers, it might require ensuring your `mypy` configuration correctly finds installed stub packages.
fix
Ensure `mypy` is up-to-date and configured to discover installed packages. If issues persist, refer to `mypy-boto3-builder` documentation for specific `mypy` configuration.
affects: >=8.12.0 (for builder) and dependent stub packages
breakingStarting with `mypy-boto3-builder` 8.9.0, there were breaking changes in TypedDict naming conventions, primarily shortening redundant suffixes (e.g., `RequestRequestTypeDef` became `RequestTypeDef`) and moving `Extra` suffixes.
fix
Update your code to use the new, shorter TypedDict names where applicable. Refer to the `mypy-boto3-builder` changelog for specific naming adjustments.
affects: >=8.9.0 (for builder) and dependent stub packages
gotchaThis package provides *only* type annotations (stubs). It does not include the actual `boto3` library. You must install `boto3` separately for your code to function at runtime.
fix
Always install `boto3` alongside `mypy-boto3-mediapackagev2`: `pip install boto3 mypy-boto3-mediapackagev2`.
affects: All
gotchaFor optimal IDE auto-completion and static analysis, explicitly type `boto3.client()` calls with the service-specific client class (e.g., `client: MediaPackageV2Client = boto3.client('mediapackagev2')`). Without explicit typing, `mypy` might infer a generic `botocore.client.BaseClient`, reducing type safety.
fix
Add explicit type annotations for `boto3.client()` return values and for TypedDicts used as arguments/returns.
affects: All
Upgrade
Version history
1.43.67latest on PyPI · released Aug 7, 2026
Audit
Dependencies
boto3requiredThis package provides type stubs for boto3; boto3 itself is required for runtime functionality.
mypyoptionalMypy (or another compatible type checker like Pyright) is required to utilize these type annotations for static analysis.
Agent activity
15 hits · last 30 days
node
12
OpenAI (training)
1
Resources
mypy-boto3-mediapackagev2 — pip install mypy-boto3-mediapackagev2 · libregistry