Registry / type-stubs / mypy-boto3-mediapackage

mypy-boto3-mediapackage

JSON →
library1.43.0pypypi✓ verified 28d ago

mypy-boto3-mediapackage provides type annotations for the boto3 MediaPackage 1.42.3 service. It enables static type checking for AWS MediaPackage clients within Python applications, enhancing code quality and developer experience. The library is generated by `mypy-boto3-builder` and is actively maintained with frequent updates, often aligning with new boto3 releases and builder improvements.

pip install mypy-boto3-mediapackage boto3
INSTALL
IMPORT
SIG · MYPY-BOTO3-MEDIAPA
M
mypy-boto3-mediapackage
type-stubspythonv1.43.0
Install
5.5s avg
Import
589ms
Disk
81MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.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.10–3.910 runs
installs and imports cleanly · install 0.0s · import 0.600s · 84.3MB
glibc
py 3.10–3.910 runs
installs and imports cleanly · install 5.5s · import 0.578s · 82MB
81MB installed
● package 81MB
Code
Verified usage

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

MediaPackageClient
✓ from mypy_boto3_mediapackage.client import MediaPackageClient
The typed client for the MediaPackage service.
MediaPackageServiceName
✓ from mypy_boto3_mediapackage.literals import MediaPackageServiceName
Literal type for the service name 'mediapackage', useful for type-safe client creation.
Session
✓ from boto3.session import Session
The standard boto3 session import, used to create clients.

This quickstart demonstrates how to initialize a `boto3` MediaPackage client and apply type annotations from `mypy-boto3-mediapackage`. Explicitly typing the client (`mediapackage_client: MediaPackageClient`) is crucial for enabling comprehensive type checking and autocompletion in IDEs.

import os from boto3.session import Session from mypy_boto3_mediapackage.client import MediaPackageClient # Ensure AWS credentials are configured (e.g., via environment variables or ~/.aws/credentials) # For example: AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION_NAME # Using os.environ.get for example purposes, in real apps boto3 handles credentials automatically. if not os.environ.get('AWS_ACCESS_KEY_ID'): print("Warning: AWS_ACCESS_KEY_ID not set. Quickstart might fail if credentials are not configured.") session = Session() # Explicitly type the client for full type-hinting and autocompletion mediapackage_client: MediaPackageClient = session.client("mediapackage") # Example: List origin endpoints (replace with an actual method if needed) try: response = mediapackage_client.list_origin_endpoints() print("Successfully listed MediaPackage origin endpoints.") for endpoint in response.get('OriginEndpoints', []): print(f" - Endpoint ID: {endpoint.get('Id')}, ARN: {endpoint.get('Arn')}") except Exception as e: print(f"Error listing origin endpoints: {e}")
Debug
Known issues
breakingPython 3.8 support has been officially removed. Users on Python 3.8 or older must upgrade to Python 3.9 or newer to use versions 8.12.0+ of `mypy-boto3-builder` generated stubs.
fix
Upgrade your Python environment to 3.9 or a later version.
affects: mypy-boto3-builder 8.12.0+, mypy-boto3-mediapackage 1.42.0+
breakingThe `mypy-boto3` ecosystem migrated to PEP 561 compliant packages. While generally an improvement, this might affect how `mypy` discovers stubs in certain environments or custom build setups.
fix
Ensure `mypy` is run in the same Python environment where `mypy-boto3-mediapackage` is installed. Review `mypy`'s documentation on PEP 561 for advanced scenarios if issues arise with stub discovery. Using `boto3-stubs` with service extras (`pip install 'boto3-stubs[mediapackage]'`) is generally recommended for seamless integration.
affects: mypy-boto3-builder 8.12.0+, mypy-boto3-mediapackage 1.42.0+
breakingBreaking changes were introduced to TypeDef naming conventions. Specifically, `CreateDistributionRequestRequestTypeDef` was shortened to `CreateDistributionRequestTypeDef`, and conflicting `Extra` postfixes were moved (e.g., `CreateDistributionExtraRequestTypeDef` became `CreateDistributionRequestExtraTypeDef`).
fix
Review and update any explicit references to `TypeDef` objects in your code to match the new naming conventions. Consult the `mypy-boto3` documentation for the specific service for the correct `TypeDef` names.
affects: mypy-boto3-builder 8.9.0+, mypy-boto3-mediapackage versions generated by these builders.
gotchaFor optimal type checking and IDE autocompletion, it is highly recommended to explicitly type annotate `boto3.client()` and `boto3.resource()` calls with the specific `mypy-boto3` client or resource type (e.g., `client: MediaPackageClient = session.client('mediapackage')`). While `mypy` can often infer types, explicit annotation provides the most robust experience.
fix
Always add explicit type annotations when creating `boto3` clients or resources, leveraging the `Client` and `ServiceResource` types from the respective `mypy-boto3` service package.
affects: All versions
gotchaThe `Session.client` and global `boto3.client` methods gained an `aws_account_id` argument. This new feature allows specifying the AWS account ID when creating a client, which can be useful for certain cross-account operations or internal tooling.
fix
Be aware of the new `aws_account_id` parameter if your workflows could benefit from it, and update your client creation calls if necessary to utilize it.
affects: mypy-boto3-builder 8.10.1+, mypy-boto3-mediapackage versions generated by these builders.
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
pythonrequiredRequired for runtime.
boto3requiredRuntime dependency for which type stubs are provided. This package provides no runtime functionality itself.
mypyoptionalThe static type checker for which these stubs are primarily intended.
Agent activity
12 hits · last 30 days
node
10
OpenAI (training)
1
Resources
mypy-boto3-mediapackage — pip install mypy-boto3-mediapackage · libregistry