Registry / type-stubs / mypy-boto3-mediaconnect

mypy-boto3-mediaconnect

JSON →
library1.43.70pypypi✓ verified 22d ago

mypy-boto3-mediaconnect provides type annotations for the boto3 MediaConnect service, enhancing static analysis and IDE autocompletion for AWS MediaConnect clients. It is part of the `mypy-boto3` family of packages, currently at version 1.42.87, and is actively maintained with frequent updates mirroring boto3 releases, generated by `mypy-boto3-builder`.

pip install mypy-boto3-mediaconnect
INSTALL
IMPORT
SIG · MYPY-BOTO3-MEDIACO
M
mypy-boto3-mediaconnect
type-stubspythonv1.43.70
Install
2.7s avg
Import
Disk
61MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.43.70 · 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.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.7MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 2.7s · import 0.000s · 19MB
61MB installed
● package 61MB
Code
Verified usage

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

MediaConnectClient
from mypy_boto3_mediaconnect import MediaConnectClient
from mypy_boto3_mediaconnect import MediaConnectClient

This quickstart demonstrates how to use `mypy-boto3-mediaconnect` to add type hints to your boto3 MediaConnect client. It initializes a typed client and lists available MediaConnect flows, leveraging the `TYPE_CHECKING` guard to prevent runtime dependency on the stub package. Remember to have `boto3` installed and AWS credentials configured for actual execution.

from typing import TYPE_CHECKING import boto3 import os if TYPE_CHECKING: from mypy_boto3_mediaconnect.client import MediaConnectClient from mypy_boto3_mediaconnect.type_defs import ListFlowsResponseTypeDef # Ensure AWS credentials are set up (e.g., via environment variables or ~/.aws/credentials) # For example, by setting AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY def list_mediaconnect_flows() -> list[str]: try: # The type annotation helps your IDE and static checker understand the client's methods client: MediaConnectClient = boto3.client( "mediaconnect", aws_access_key_id=os.environ.get('AWS_ACCESS_KEY_ID', 'DUMMY_KEY'), aws_secret_access_key=os.environ.get('AWS_SECRET_ACCESS_KEY', 'DUMMY_SECRET'), region_name=os.environ.get('AWS_DEFAULT_REGION', 'us-east-1') ) response: ListFlowsResponseTypeDef = client.list_flows() flow_names = [flow['Name'] for flow in response.get('Flows', []) if 'Name' in flow] print(f"Found MediaConnect flows: {flow_names}") return flow_names except Exception as e: print(f"Error listing MediaConnect flows: {e}") return [] if __name__ == "__main__": list_mediaconnect_flows()
Debug
Known issues
breakingSupport for Python 3.8 was removed from `mypy-boto3-builder` version 8.12.0, meaning `mypy-boto3-mediaconnect` packages generated by this builder version or newer will not support Python 3.8.
fix
Upgrade your Python environment to 3.9 or higher.
affects: mypy-boto3-mediaconnect >= 1.42.87 (generated by builder 8.12.0+)
breakingThere were breaking changes in `TypeDef` naming conventions in `mypy-boto3-builder` version 8.9.0. Specifically, `TypeDef` names for packed method arguments became shorter (e.g., `CreateDistributionRequestRequestTypeDef` to `CreateDistributionRequestTypeDef`), and conflicting `Extra` postfixes were moved to the end.
fix
Review your code for any custom `TypeDef` imports and update their names according to the new conventions.
affects: mypy-boto3-mediaconnect generated by builder 8.9.0+
gotchaThis package provides *only* type stubs. For your code to run, you must also install the `boto3` library, as `mypy-boto3-mediaconnect` does not include the runtime implementation.
fix
Ensure `pip install boto3` is part of your project's dependency management.
affects: All versions
gotchaTo avoid making `mypy-boto3-mediaconnect` a runtime dependency, which is unnecessary overhead, always wrap your type imports within a `if TYPE_CHECKING:` block.
fix
Use `from typing import TYPE_CHECKING; if TYPE_CHECKING: from mypy_boto3_mediaconnect.client import MediaConnectClient` for all type imports.
affects: All versions
gotchaFor optimal IDE autocompletion and type checking (especially in VSCode), it is recommended to explicitly annotate the client object when creating it, e.g., `client: MediaConnectClient = boto3.client("mediaconnect")`.
fix
Add explicit type annotations to `boto3.client` and `boto3.session.client` calls for better developer experience.
affects: All versions
Upgrade
Version history
1.43.70latest on PyPI · released Aug 12, 2026
Audit
Dependencies
boto3requiredProvides the actual runtime functionality for interacting with AWS services. `mypy-boto3-mediaconnect` only offers type hints.
Agent activity
25 hits · last 30 days
node
22
OpenAI (training)
1
Resources