Registry / type-stubs / mypy-boto3-mediastore-data

mypy-boto3-mediastore-data

JSON →
library1.43.0pypypi✓ verified 22d ago

Type annotations for the boto3 MediaStoreData service (version 1.42.3), generated with mypy-boto3-builder 8.12.0. This library provides type hints compatible with static analysis tools like mypy and IDEs such as VSCode and PyCharm, enhancing code completion and catching type-related errors early. It is actively maintained with releases frequently updated to match boto3 versions.

pip install mypy-boto3-mediastore-data
INSTALL
IMPORT
SIG · MYPY-BOTO3-MEDIAST
M
mypy-boto3-mediastore-data
type-stubspythonv1.43.0
Install
3.5s avg
Import
Disk
18MB
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.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.6MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 3.5s · import 0.000s · 20MB
18MB installed
● package 18MB
Code
Verified usage

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

MediaStoreDataClient
from mypy_boto3_mediastore_data import MediaStoreDataClient
from mypy_boto3_mediastore_data import MediaStoreDataClient

This example demonstrates how to initialize a `MediaStoreDataClient` with explicit type hinting and use the `put_object` method to upload data to an AWS Elemental MediaStore container. It showcases using `PutObjectResponseTypeDef` for the return type and includes error handling. Remember to replace placeholder values and ensure `boto3` is configured with appropriate AWS credentials and the MediaStore container's data endpoint.

import boto3 from mypy_boto3_mediastore_data.client import MediaStoreDataClient from mypy_boto3_mediastore_data.type_defs import PutObjectResponseTypeDef def upload_to_mediastore_data(container_endpoint: str, object_path: str, data: bytes, content_type: str) -> PutObjectResponseTypeDef: """Uploads an object to AWS Elemental MediaStore Data plane.""" # Create a boto3 session. Credentials will be picked up from environment variables or ~/.aws/credentials session = boto3.Session() # Create a MediaStoreData client using the container endpoint client: MediaStoreDataClient = session.client( "mediastore-data", endpoint_url=container_endpoint, region_name=os.environ.get('AWS_REGION', 'us-east-1') # Or specify your region ) print(f"Uploading object to {object_path} in container at {container_endpoint}...") response: PutObjectResponseTypeDef = client.put_object( Body=data, Path=object_path, ContentType=content_type, # StorageClass='TEMPORAL' # Optional, default is TEMPORAL # UploadAvailability='STANDARD' # Optional, default is STANDARD ) print(f"Upload successful. ETag: {response.get('ETag')}, ContentSHA256: {response.get('ContentSHA256')}") return response # Example usage (replace with your actual endpoint and data) if __name__ == "__main__": import os sample_endpoint = os.environ.get('MEDIASTORE_DATA_ENDPOINT', 'https://data.mediastore.us-east-1.amazonaws.com') sample_path = "videos/my_video.mp4" sample_data = b"This is some sample video content." sample_content_type = "video/mp4" if not sample_endpoint or sample_endpoint == 'https://data.mediastore.us-east-1.amazonaws.com': print("WARNING: Please set the MEDIASTORE_DATA_ENDPOINT environment variable to your container's data endpoint.") print("Skipping actual upload, showing example structure only.") else: try: upload_to_mediastore_data(sample_endpoint, sample_path, sample_data, sample_content_type) except Exception as e: print(f"Error during upload: {e}")
Debug
Known issues
breakingSupport for Python 3.8 has been removed in `mypy-boto3-builder` version 8.12.0 and later. Users must use Python 3.9 or newer.
fix
Upgrade your Python environment to 3.9 or higher.
affects: mypy-boto3-builder >= 8.12.0
breakingThe `mypy-boto3` packages (including this one) migrated to PEP 561 compliant packaging in `mypy-boto3-builder` 8.12.0. This might change how some older or custom type-checking setups discover stubs.
fix
Ensure your `mypy` configuration (or other type checkers) is up-to-date and correctly discovers PEP 561 packages. Generally, this change should be transparent for most users.
affects: mypy-boto3-builder >= 8.12.0
breakingTypeDef naming conventions changed in `mypy-boto3-builder` 8.9.0. Previously, some TypeDefs for packed method arguments had redundant `RequestRequestTypeDef` suffixes (e.g., `CreateDistributionRequestRequestTypeDef`). These are now shortened (e.g., `CreateDistributionRequestTypeDef`).
fix
Update any custom type hints or code that directly references these generated TypeDef names to reflect the shorter convention.
affects: mypy-boto3-builder >= 8.9.0
gotchaFor optimal code completion and type checking in IDEs like VSCode and PyCharm, it is recommended to use explicit type annotations for `boto3.client()` and `boto3.session.client()` calls.
fix
Explicitly type your client, e.g., `client: MediaStoreDataClient = session.client('mediastore-data')`.
affects: All
gotchaPyCharm users experiencing slow performance or high CPU usage due to Literal overloads (PyCharm issue PY-40997) might benefit from installing `boto3-stubs-lite` instead of the full `boto3-stubs` or `mypy-boto3-*` packages. The lite version is more RAM-friendly but requires more explicit type annotations.
fix
Uninstall existing stubs (`pip uninstall boto3-stubs`) and install the lite version: `pip install 'boto3-stubs-lite[mediastore-data]'`. Alternatively, disable PyCharm's internal type checker and use `mypy` or `pyright` externally.
affects: All (specific to PyCharm)
Upgrade
Version history
1.43.0latest on PyPI · released Apr 29, 2026
Audit
Dependencies
boto3requiredRuntime dependency for the AWS SDK
Agent activity
21 hits · last 30 days
node
18
OpenAI (training)
2
Resources
mypy-boto3-mediastore-data — pip install mypy-boto3-mediastore-data · libregistry